Package org.apache.uima.caseditor.ide
Class DefaultCasDocumentProvider
java.lang.Object
org.apache.uima.caseditor.editor.CasDocumentProvider
org.apache.uima.caseditor.ide.DefaultCasDocumentProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.uima.caseditor.editor.CasDocumentProvider
CasDocumentProvider.ElementInfo
-
Field Summary
Fields inherited from class org.apache.uima.caseditor.editor.CasDocumentProvider
elementErrorStatus, TYPE_SYSTEM_NOT_AVAILABLE_STATUS_CODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ICasDocument
createDocument
(Object element) Creates the a newAnnotationDocument
from the givenIEditorInput
element.protected CasDocumentProvider.ElementInfo
createElementInfo
(Object element) Creates the element info.org.eclipse.swt.widgets.Composite
createTypeSystemSelectorForm
(ICasEditor editor, org.eclipse.swt.widgets.Composite parent, org.eclipse.core.runtime.IStatus status) Creates the type system selector form.protected void
disposeElementInfo
(Object element, CasDocumentProvider.ElementInfo info) Dispose element info.protected void
doSaveDocument
(org.eclipse.core.runtime.IProgressMonitor monitor, Object element, ICasDocument document, boolean overwrite) Do save document.org.eclipse.jface.preference.IPreferenceStore
getSessionPreferenceStore
(Object element) Retrieves the session preference store.org.eclipse.jface.preference.IPreferenceStore
getTypeSystemPreferenceStore
(Object element) Retrieves the persistent per type system preference store.void
saveTypeSystemPreferenceStore
(Object element) Save type system preference store.Methods inherited from class org.apache.uima.caseditor.editor.CasDocumentProvider
addElementStateListener, fireElementChanged, fireElementDeleted, fireElementDirtyStateChanged, getStatus, removeElementStateListener
-
Constructor Details
-
DefaultCasDocumentProvider
public DefaultCasDocumentProvider()
-
-
Method Details
-
createDocument
Description copied from class:CasDocumentProvider
Creates the a newAnnotationDocument
from the givenIEditorInput
element. For all other elements null is returned.- Specified by:
createDocument
in classCasDocumentProvider
- Parameters:
element
- the element- Returns:
- the i cas document
- Throws:
org.eclipse.core.runtime.CoreException
- the core exception
-
doSaveDocument
protected void doSaveDocument(org.eclipse.core.runtime.IProgressMonitor monitor, Object element, ICasDocument document, boolean overwrite) throws org.eclipse.core.runtime.CoreException Description copied from class:CasDocumentProvider
Do save document.- Specified by:
doSaveDocument
in classCasDocumentProvider
- Parameters:
monitor
- the monitorelement
- the elementdocument
- the documentoverwrite
- the overwrite- Throws:
org.eclipse.core.runtime.CoreException
- the core exception
-
saveTypeSystemPreferenceStore
Description copied from class:CasDocumentProvider
Save type system preference store.- Specified by:
saveTypeSystemPreferenceStore
in classCasDocumentProvider
- Parameters:
element
- the element
-
getTypeSystemPreferenceStore
Description copied from class:CasDocumentProvider
Retrieves the persistent per type system preference store. This store is usually saved in relation to the type system, e.g. an ide plugin could save a preference file next to the type system file.- Specified by:
getTypeSystemPreferenceStore
in classCasDocumentProvider
- Parameters:
element
- the element- Returns:
- the preference store or null if it cannot be retrieved, e.g no document was created for the input.
-
getSessionPreferenceStore
Description copied from class:CasDocumentProvider
Retrieves the session preference store. This preference store is used to store session data which should be used to initialize a freshly opened editor.- Specified by:
getSessionPreferenceStore
in classCasDocumentProvider
- Parameters:
element
- the element- Returns:
- the session preference store
-
createTypeSystemSelectorForm
public org.eclipse.swt.widgets.Composite createTypeSystemSelectorForm(ICasEditor editor, org.eclipse.swt.widgets.Composite parent, org.eclipse.core.runtime.IStatus status) Description copied from class:CasDocumentProvider
Creates the type system selector form.- Specified by:
createTypeSystemSelectorForm
in classCasDocumentProvider
- Parameters:
editor
- the editorparent
- the parentstatus
- the status- Returns:
- the composite
-
createElementInfo
Description copied from class:CasDocumentProvider
Creates the element info.- Overrides:
createElementInfo
in classCasDocumentProvider
- Parameters:
element
- the element- Returns:
- the element info
-
disposeElementInfo
Description copied from class:CasDocumentProvider
Dispose element info.- Overrides:
disposeElementInfo
in classCasDocumentProvider
- Parameters:
element
- the elementinfo
- the info
-