Class MultiPageEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.ui.forms.editor.FormEditor
org.apache.uima.taeconfigurator.editors.MultiPageEditor
- All Implemented Interfaces:
IUimaMultiPageEditor
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.jface.dialogs.IPageChangeProvider
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
public class MultiPageEditor
extends org.eclipse.ui.forms.editor.FormEditor
implements IUimaMultiPageEditor
Main class implementing the multi page editor. In Eclipse 3, we extend FormEditor, which extends
in turn MultiPageEditorPart.
Life cycle: Create: An instance of this class is created each time the editor is started on a new
resource. Base multipage editor createPartControl calls createPages; FormEditor's impl of
createPages calls createToolkit, then calls addPages. FormEditor has field holding the toolkit
This class overrides createToolkit to re-use the colors in the plugin. * Dispose: dispose is
called. FormEditor impl of dispose disposes of the toolkit.
Superclass (FormEditor) holds vector of pages toolkit (disposed of in FormEditor dispose method)
SuperSuperclass (MultiPageEditorPart) holds array of editors (we only have 1 "editor" - the xml
source editor - the rest are views into that model / data).
Stale = model (on disk, saved) is ahead of widgets Dirty = widgets are ahead of model
<<< NOT USED HERE
Each page of the multipage editor has its own class. ownclass -%gt; HeaderPage -%gt; FormPage
(impl IFormPage) has instance of PageForm -%gt; ManagedForm ManagedForm (impl IManagedForm): has
instance of ScrolledForm has subparts (IFormPart - which live on the scrolled form) A part can be
a section. A part can implement IPartSelectionListener to get selectionChanged(IFormPart,
ISelection) calls. initialize() call propagated to all parts. dispose() call propagated to all
parts. refresh() propagated to all parts (if part.isStale()) (Not Used) commit() propagated to
all parts (if part.isDirty()) setInput() propagated to all parts setFocus() propagated to 1st
part (not used) isDirty() propagated to all parts, is true if any are true isStale() propagated
to all parts, is true if any are true reflow() delegated to the contained ScrolledForm (not used)
fireSelectionChanged(IFormPart, ISelection) - can be used to notify other parts that implement
IPartSelectionListener about selection changes
Each page has one or more sections. sectionSpecific -> (AbstractTableSection) ->
AbstractSection -> SectionPart -> AbstractFormPart (impl IFormPart, see above)
AbstractFormPart holds back ref to managed form, a dirty and stale bit. Stale = model is ahead of
widgets (Not used) Dirty = widgets are ahead of model Stale brought into sync by 'refresh'
method. Part notifies containing ManagedForm when Stale/Dirty changes in the part; Part
responsible for removing listeners from event providers. IFormPart can receive form input
SectionPart adds listeners for expansionStateChang(ed)(ing) expansionStateChanged calls reflow on
wrapped form Note: the forms framework Dirty mechanism and the "commit" methods are not used. In
its place, the handlers directly update the model, rather than marking Dirty and letting someone
call commit.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The Class JCasGenProgressMonitor.static class
The Class JCasGenThrower. -
Field Summary
Modifier and TypeFieldDescriptionThe all types.protected int
The capability index.protected CapabilityPage
The capability page.The defined types with supers.static final int
The Constant DESCRIPTOR_AE.static final int
The Constant DESCRIPTOR_CASCONSUMER.static final int
The Constant DESCRIPTOR_CASINITIALIZER.static final int
The Constant DESCRIPTOR_COLLECTIONREADER.static final int
The Constant DESCRIPTOR_EXTRESANDBINDINGS.static final int
The Constant DESCRIPTOR_FLOWCONTROLLER.static final int
The Constant DESCRIPTOR_INDEX.static final int
The Constant DESCRIPTOR_TYPEPRIORITY.static final int
The Constant DESCRIPTOR_TYPESYSTEM.The descriptor CAS.protected int
The indexes index.protected IndexesPage
The indexes page.final int
The initial size feature collections.final int
The initial size type collections.protected boolean
The is bad XML.protected boolean
The is page change recursion.int
The m n save as status.protected int
The overview index.protected OverviewPage
The overview page.static final String
The Constant PATH_SEPARATOR.final boolean
The preserve comments.protected int
The resources index.protected ResourcesPage
The resources page.static final int
The Constant SAVE_AS_CANCELLED.static final int
The Constant SAVE_AS_CONFIRMED.static final int
The Constant SAVE_AS_NOT_IN_PROGRESS.static final int
The Constant SAVE_AS_STARTED.boolean
The source changed.protected int
The source index.protected XMLEditor
The source text editor.static final TypeDescription[]
The Constant typeDescriptionArray0.protected int
The type index.protected TypePage
The type page.Fields inherited from class org.eclipse.ui.forms.editor.FormEditor
pages
Fields inherited from class org.eclipse.ui.part.MultiPageEditorPart
PAGE_CONTAINER_SITE
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDirtyTypeName
(String typeName) Adds the dirty type name.protected int
addPageAndSetTabTitle
(HeaderPage page, String keyTabTitle) Adds the page and set tab title.protected int
addPageAndSetTabTitle
(org.eclipse.ui.IEditorPart page, org.eclipse.ui.IEditorInput input, String keyTabTitle) Adds the page and set tab title.protected void
addPages()
void
Adds the pages for current editor.createCas
(AnalysisEngineDescription aAeDescription, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) Creates the cas.Create a resource manager that has a class loader that will search the compiled output of the current project, in addition to the plug-in's classpath.createResourceManager
(String classPath) Creates the resource manager.protected org.eclipse.ui.forms.widgets.FormToolkit
createToolkit
(org.eclipse.swt.widgets.Display display) override the createToolkit method in FormEditor - to use a shared colors resource.Descriptor type string.descriptorTypeString
(int pDescriptorType) Descriptor type string.void
doJCasGen
(org.eclipse.core.runtime.IProgressMonitor monitor) Do J cas gen.void
doJCasGenChkSrc
(org.eclipse.core.runtime.IProgressMonitor monitor) Do J cas gen chk src.void
doSave
(org.eclipse.core.runtime.IProgressMonitor monitor) Saves the multi-page editor's document.void
doSaveAs()
Saves the multi-page editor's document as another file.void
Do save as for current editor.void
doSaveForCurrentEditor
(org.eclipse.core.runtime.IProgressMonitor monitor) Do save for current editor.void
firePropertyChangeSuper
(int propertyId) Fire property change super.getAbsolutePathFromImport
(Import importItem) Gets the absolute path from import.Gets the ae description.Gets the aggregate page.org.eclipse.jdt.core.IType
Gets the analysis component I type.org.eclipse.jdt.core.IType
Gets the base annotator I type.Gets the capability page.org.eclipse.jdt.core.IType
Gets the cas consumer I type.org.eclipse.jdt.core.IType
Gets the cas initializer I type.getCharSet
(String text) Gets the char set.org.eclipse.jdt.core.IType
Gets the collection reader I type.int
Gets the current page super.Gets the current view.gets the Hash Map of resolved AE delegates Clones the description first because the getting updates it in some cases.static ResourceSpecifier
getDelegateResourceSpecifier
(org.eclipse.core.resources.IFile iFile, String[] componentHeaders) Used by code to get lists of delegate components by input/output type specs.Gets the descriptor directory.getDescriptorRelativePath
(String aFullOrRelativePath) Gets the descriptor relative path.int
Gets the descriptor type.Gets the ext res and bindings.org.eclipse.swt.graphics.Color
Gets the fade color.org.eclipse.core.resources.IFile
getFile()
Gets the file.getFilteredProjectClassPath
(boolean filterCoreResources) Gets the filtered project class path.org.eclipse.jdt.core.IType
Gets the flow controller I type.Gets the fs index collection.getFullPathFromDescriptorRelativePath
(String aDescRelPath) Gets the full path from descriptor relative path.getIFileOrFile
(String relOrAbsPath) Gets the i file or file.Gets the imported fs index collection.Gets the imported type priorities.Gets the imported type system desription.Gets the indexes page.boolean
Gets the checks if is context loaded.org.eclipse.jdt.core.IJavaProject
Gets the java project.boolean
Gets the limit J cas gen to project scope.Gets the merged fs index collection.Gets the merged type priorities.Gets the merged type system description.Gets the messages to root cause.Gets the overview page.Gets the parameter page.org.eclipse.core.resources.IResource
Gets the primary source folder.org.eclipse.core.resources.IProject
Gets the project.Gets the project class path.Gets the resolved delegates.Gets the resolved external resources and bindings.Gets the resolved flow controller declaration.Gets the resources page.org.eclipse.jdt.core.search.IJavaSearchScope
Gets the search scope for descriptor type.Gets the settings page.Gets the source editor.org.eclipse.ui.texteditor.ITextEditor
Gets the source page editor.org.eclipse.jdt.core.IType
getTypeFromProject
(String typename) Gets the type from project.Gets the type page.Gets the type priorities.Gets the type system description.Gets the XML editor page.void
init
(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) void
initSuper
(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) boolean
Checks if is ae descriptor.boolean
Checks if is aggregate.boolean
Checks if is cas consumer descriptor.boolean
Checks if is cas initializer descriptor.boolean
Checks if is collection reader descriptor.boolean
isDirty()
boolean
Checks if is ext res and bindings descriptor.boolean
isFileInWorkspace
(String aFileRelPath) Checks if is file in workspace.boolean
Checks if is flow controller descriptor.boolean
Checks if is fs index collection.boolean
Checks if is local processing descriptor.boolean
Checks if is primitive.boolean
boolean
boolean
Checks if is source folder valid.boolean
Checks if is type priority descriptor.boolean
Checks if is type system descriptor.boolean
Checks if is valid AE.void
jcasGen
(org.eclipse.core.runtime.IProgressMonitor monitor) Jcas gen.void
Mark all pages stale.void
Mark T cas dirty.void
Open.void
open
(org.eclipse.core.resources.IFile fileToOpen) Open.void
openTextEditor
(String fullPath) Open text editor.void
openTextEditor
(org.eclipse.core.resources.IFile fileToOpen) Open text editor.protected void
pageChange
(int newPageIndex) void
pageChangeForCurrentEditor
(int newPageIndex) Page change for current editor.void
pageChangeSuper
(int newPageIndex) Page change super.Pretty print model.void
removeDirtyTypeName
(String typeName) Removes the dirty type name.void
setActivePageSuper
(int pageIndex) Sets the active page super.protected void
setActivePageWhileBlockingRecursion
(int sourceIndex) Sets the active page while blocking recursion.void
setAeDescription
(AnalysisEngineDescription aAnalysisEngineDescription) Sets the ae description.void
Sets the file dirty.void
setFileDirtyFlag
(boolean value) Sets the file dirty flag.void
Sets the imported type system description.void
setInputSuper
(org.eclipse.ui.IEditorInput input) Sets the input super.void
setLimitJCasGenToProjectScope
(boolean v) Sets the limit J cas gen to project scope.void
Sets the merged fs index collection.void
Sets the merged fs index collection.void
Sets the merged type priorities.void
Sets the merged type priorities.void
Sets the merged type system description.void
Sets the merged type system description.void
setPageTextSuper
(int pageIndex, String text) Sets the page text super.void
setPartNameSuper
(String partName) Sets the part name super.void
A Merge method doesn't "fit". merging isn't done over aggregates for these.void
Sets the resolved external resources and bindings.void
Sets the resolved flow controller declaration.void
setSaveAsStatus
(int nStatus) Sets the save as status.void
setTypeSystemDescription
(TypeSystemDescription typeSystemDescription) Sets the type system description.void
Update source from model.boolean
validateInputs
(Map typeNameHash) Validate inputs.boolean
validateIOs
(boolean isValidateInputs, Map typeNameHash) Validate I os.boolean
validateOutputs
(Map typeNameHash) Validate outputs.boolean
validateTypePriorities
(Map typeNameHash) Validate type priorities.Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, close, commitPages, configurePage, createPageContainer, createPages, dispose, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, removePage, selectReveal, setActivePage, setActivePage, setActivePage, updateActionBarContributor
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
activateSite, addPageChangedListener, createContainer, createItem, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, removePageChangedListener, setActiveEditor, setControl, setFocus, setPageImage, setPageText
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
-
Field Details
-
INITIAL_SIZE_TYPE_COLLECTIONS
public final int INITIAL_SIZE_TYPE_COLLECTIONSThe initial size type collections.- See Also:
-
INITIAL_SIZE_FEATURE_COLLECTIONS
public final int INITIAL_SIZE_FEATURE_COLLECTIONSThe initial size feature collections.- See Also:
-
PRESERVE_COMMENTS
public final boolean PRESERVE_COMMENTSThe preserve comments.- See Also:
-
descriptorCAS
The descriptor CAS. -
allTypes
The all types. -
definedTypesWithSupers
The defined types with supers. -
sourceIndex
protected int sourceIndexThe source index. -
overviewIndex
protected int overviewIndexThe overview index. -
typeIndex
protected int typeIndexThe type index. -
capabilityIndex
protected int capabilityIndexThe capability index. -
indexesIndex
protected int indexesIndexThe indexes index. -
resourcesIndex
protected int resourcesIndexThe resources index. -
overviewPage
The overview page. -
typePage
The type page. -
capabilityPage
The capability page. -
indexesPage
The indexes page. -
resourcesPage
The resources page. -
sourceTextEditor
The source text editor. -
isBadXML
protected boolean isBadXMLThe is bad XML. -
sourceChanged
public boolean sourceChangedThe source changed. -
m_nSaveAsStatus
public int m_nSaveAsStatusThe m n save as status. -
SAVE_AS_NOT_IN_PROGRESS
public static final int SAVE_AS_NOT_IN_PROGRESSThe Constant SAVE_AS_NOT_IN_PROGRESS.- See Also:
-
SAVE_AS_STARTED
public static final int SAVE_AS_STARTEDThe Constant SAVE_AS_STARTED.- See Also:
-
SAVE_AS_CANCELLED
public static final int SAVE_AS_CANCELLEDThe Constant SAVE_AS_CANCELLED.- See Also:
-
SAVE_AS_CONFIRMED
public static final int SAVE_AS_CONFIRMEDThe Constant SAVE_AS_CONFIRMED.- See Also:
-
DESCRIPTOR_AE
public static final int DESCRIPTOR_AEThe Constant DESCRIPTOR_AE.- See Also:
-
DESCRIPTOR_TYPESYSTEM
public static final int DESCRIPTOR_TYPESYSTEMThe Constant DESCRIPTOR_TYPESYSTEM.- See Also:
-
DESCRIPTOR_INDEX
public static final int DESCRIPTOR_INDEXThe Constant DESCRIPTOR_INDEX.- See Also:
-
DESCRIPTOR_TYPEPRIORITY
public static final int DESCRIPTOR_TYPEPRIORITYThe Constant DESCRIPTOR_TYPEPRIORITY.- See Also:
-
DESCRIPTOR_EXTRESANDBINDINGS
public static final int DESCRIPTOR_EXTRESANDBINDINGSThe Constant DESCRIPTOR_EXTRESANDBINDINGS.- See Also:
-
DESCRIPTOR_COLLECTIONREADER
public static final int DESCRIPTOR_COLLECTIONREADERThe Constant DESCRIPTOR_COLLECTIONREADER.- See Also:
-
DESCRIPTOR_CASINITIALIZER
public static final int DESCRIPTOR_CASINITIALIZERThe Constant DESCRIPTOR_CASINITIALIZER.- See Also:
-
DESCRIPTOR_CASCONSUMER
public static final int DESCRIPTOR_CASCONSUMERThe Constant DESCRIPTOR_CASCONSUMER.- See Also:
-
DESCRIPTOR_FLOWCONTROLLER
public static final int DESCRIPTOR_FLOWCONTROLLERThe Constant DESCRIPTOR_FLOWCONTROLLER.- See Also:
-
isPageChangeRecursion
protected boolean isPageChangeRecursionThe is page change recursion. -
typeDescriptionArray0
The Constant typeDescriptionArray0. -
PATH_SEPARATOR
The Constant PATH_SEPARATOR.
-
-
Constructor Details
-
MultiPageEditor
public MultiPageEditor()Instantiates a new multi page editor.
-
-
Method Details
-
getIsContextLoaded
public boolean getIsContextLoaded()Gets the checks if is context loaded.- Returns:
- the checks if is context loaded
-
getLimitJCasGenToProjectScope
public boolean getLimitJCasGenToProjectScope()Gets the limit J cas gen to project scope.- Returns:
- the limit J cas gen to project scope
-
setLimitJCasGenToProjectScope
public void setLimitJCasGenToProjectScope(boolean v) Sets the limit J cas gen to project scope.- Parameters:
v
- the new limit J cas gen to project scope
-
getDescriptorType
public int getDescriptorType()Gets the descriptor type.- Returns:
- the descriptor type
-
descriptorTypeString
Descriptor type string.- Parameters:
pDescriptorType
- the descriptor type- Returns:
- the string
-
descriptorTypeString
Descriptor type string.- Returns:
- the string
-
isAeDescriptor
public boolean isAeDescriptor()Checks if is ae descriptor.- Returns:
- true, if is ae descriptor
-
isTypeSystemDescriptor
public boolean isTypeSystemDescriptor()Checks if is type system descriptor.- Returns:
- true, if is type system descriptor
-
isFsIndexCollection
public boolean isFsIndexCollection()Checks if is fs index collection.- Returns:
- true, if is fs index collection
-
isTypePriorityDescriptor
public boolean isTypePriorityDescriptor()Checks if is type priority descriptor.- Returns:
- true, if is type priority descriptor
-
isExtResAndBindingsDescriptor
public boolean isExtResAndBindingsDescriptor()Checks if is ext res and bindings descriptor.- Returns:
- true, if is ext res and bindings descriptor
-
isCollectionReaderDescriptor
public boolean isCollectionReaderDescriptor()Checks if is collection reader descriptor.- Returns:
- true, if is collection reader descriptor
-
isCasInitializerDescriptor
public boolean isCasInitializerDescriptor()Checks if is cas initializer descriptor.- Returns:
- true, if is cas initializer descriptor
-
isCasConsumerDescriptor
public boolean isCasConsumerDescriptor()Checks if is cas consumer descriptor.- Returns:
- true, if is cas consumer descriptor
-
isFlowControllerDescriptor
public boolean isFlowControllerDescriptor()Checks if is flow controller descriptor.- Returns:
- true, if is flow controller descriptor
-
isLocalProcessingDescriptor
public boolean isLocalProcessingDescriptor()Checks if is local processing descriptor.- Returns:
- true, if is local processing descriptor
-
isPrimitive
public boolean isPrimitive()Checks if is primitive.- Returns:
- true, if is primitive
-
isAggregate
public boolean isAggregate()Checks if is aggregate.- Returns:
- true, if is aggregate
-
initSuper
public void initSuper(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException - Parameters:
site
- the siteeditorInput
- the editor input- Throws:
org.eclipse.ui.PartInitException
- the part init exception
-
getCurrentPageSuper
public int getCurrentPageSuper()Gets the current page super.- Returns:
- the current page super
-
setPartNameSuper
Sets the part name super.- Parameters:
partName
- the new part name super
-
setPageTextSuper
Sets the page text super.- Parameters:
pageIndex
- the page indextext
- the text
-
pageChangeSuper
public void pageChangeSuper(int newPageIndex) Page change super.- Parameters:
newPageIndex
- the new page index
-
setActivePageSuper
public void setActivePageSuper(int pageIndex) Sets the active page super.- Parameters:
pageIndex
- the new active page super
-
firePropertyChangeSuper
public void firePropertyChangeSuper(int propertyId) Fire property change super.- Parameters:
propertyId
- the property id
-
setInputSuper
public void setInputSuper(org.eclipse.ui.IEditorInput input) Sets the input super.- Parameters:
input
- the new input super
-
getSourceEditor
Gets the source editor.- Returns:
- the source editor
-
createToolkit
protected org.eclipse.ui.forms.widgets.FormToolkit createToolkit(org.eclipse.swt.widgets.Display display) override the createToolkit method in FormEditor - to use a shared colors resource. This method is called by the FormEditor's createPages() method which will in turn call the addPages method below. The toolkit ref is stored in the FormEditor object, and can be retrieved by getToolkit().- Overrides:
createToolkit
in classorg.eclipse.ui.forms.editor.FormEditor
-
addPageAndSetTabTitle
protected int addPageAndSetTabTitle(HeaderPage page, String keyTabTitle) throws org.eclipse.ui.PartInitException Adds the page and set tab title.- Parameters:
page
- the pagekeyTabTitle
- the key tab title- Returns:
- the int
- Throws:
org.eclipse.ui.PartInitException
- the part init exception
-
addPageAndSetTabTitle
protected int addPageAndSetTabTitle(org.eclipse.ui.IEditorPart page, org.eclipse.ui.IEditorInput input, String keyTabTitle) throws org.eclipse.ui.PartInitException Adds the page and set tab title.- Parameters:
page
- the pageinput
- the inputkeyTabTitle
- the key tab title- Returns:
- the int
- Throws:
org.eclipse.ui.PartInitException
- the part init exception
-
addPages
protected void addPages()- Specified by:
addPages
in classorg.eclipse.ui.forms.editor.FormEditor
-
addPagesForCurrentEditor
public void addPagesForCurrentEditor()Description copied from interface:IUimaMultiPageEditor
Adds the pages for current editor.- Specified by:
addPagesForCurrentEditor
in interfaceIUimaMultiPageEditor
-
jcasGen
public void jcasGen(org.eclipse.core.runtime.IProgressMonitor monitor) Jcas gen.- Parameters:
monitor
- the monitor
-
doJCasGenChkSrc
public void doJCasGenChkSrc(org.eclipse.core.runtime.IProgressMonitor monitor) Do J cas gen chk src.- Parameters:
monitor
- the monitor
-
isSourceFolderValid
public boolean isSourceFolderValid()Checks if is source folder valid.- Returns:
- true, if is source folder valid
-
isValidAE
Checks if is valid AE.- Parameters:
aAe
- the a ae- Returns:
- true, if is valid AE
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor) Saves the multi-page editor's document.- Specified by:
doSave
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSave
in classorg.eclipse.ui.part.EditorPart
- Parameters:
monitor
- the monitor
-
doSaveForCurrentEditor
public void doSaveForCurrentEditor(org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IUimaMultiPageEditor
Do save for current editor.- Specified by:
doSaveForCurrentEditor
in interfaceIUimaMultiPageEditor
- Parameters:
monitor
- the monitor
-
doSaveAs
public void doSaveAs()Saves the multi-page editor's document as another file. Updates this multi-page editor's input to correspond to the nested editor's. This is not implemented correctly: filename isn't switched to new filename, etc.- Specified by:
doSaveAs
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSaveAs
in classorg.eclipse.ui.part.EditorPart
-
doSaveAsForCurrentEditor
public void doSaveAsForCurrentEditor()Description copied from interface:IUimaMultiPageEditor
Do save as for current editor.- Specified by:
doSaveAsForCurrentEditor
in interfaceIUimaMultiPageEditor
-
isDirty
public boolean isDirty()- Specified by:
isDirty
in interfaceorg.eclipse.ui.ISaveablePart
- Overrides:
isDirty
in classorg.eclipse.ui.forms.editor.FormEditor
-
isSaveOnCloseNeeded
public boolean isSaveOnCloseNeeded()- Specified by:
isSaveOnCloseNeeded
in interfaceorg.eclipse.ui.ISaveablePart
- Overrides:
isSaveOnCloseNeeded
in classorg.eclipse.ui.part.EditorPart
-
setFileDirty
public void setFileDirty()Sets the file dirty. -
setFileDirtyFlag
public void setFileDirtyFlag(boolean value) Sets the file dirty flag.- Parameters:
value
- the new file dirty flag
-
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException - Specified by:
init
in interfaceorg.eclipse.ui.IEditorPart
- Overrides:
init
in classorg.eclipse.ui.forms.editor.FormEditor
- Throws:
org.eclipse.ui.PartInitException
-
createResourceManager
Create a resource manager that has a class loader that will search the compiled output of the current project, in addition to the plug-in's classpath. We create a new resource manager every time it's needed to pick up any changes the user may have made to any classes that could have been loaded.- Returns:
- a resource manager that has a class loader that will search the compiled output of the current project, in addition to the plug-in's classpath
-
createResourceManager
Creates the resource manager.- Parameters:
classPath
- the class path- Returns:
- the resource manager
-
isSaveAsAllowed
public boolean isSaveAsAllowed()- Specified by:
isSaveAsAllowed
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isSaveAsAllowed
in classorg.eclipse.ui.part.EditorPart
-
pageChange
protected void pageChange(int newPageIndex) - Overrides:
pageChange
in classorg.eclipse.ui.forms.editor.FormEditor
-
pageChangeForCurrentEditor
public void pageChangeForCurrentEditor(int newPageIndex) Description copied from interface:IUimaMultiPageEditor
Page change for current editor.- Specified by:
pageChangeForCurrentEditor
in interfaceIUimaMultiPageEditor
- Parameters:
newPageIndex
- the new page index
-
setActivePageWhileBlockingRecursion
protected void setActivePageWhileBlockingRecursion(int sourceIndex) Sets the active page while blocking recursion.- Parameters:
sourceIndex
- the new active page while blocking recursion
-
getCharSet
Gets the char set.- Parameters:
text
- the text- Returns:
- the char set
-
markAllPagesStale
public void markAllPagesStale()Mark all pages stale. -
prettyPrintModel
Pretty print model.- Returns:
- the string
-
updateSourceFromModel
public void updateSourceFromModel()Update source from model. -
getAeDescription
Gets the ae description.- Returns:
- the ae description
-
setAeDescription
public void setAeDescription(AnalysisEngineDescription aAnalysisEngineDescription) throws ResourceInitializationException Sets the ae description.- Parameters:
aAnalysisEngineDescription
- the new ae description- Throws:
ResourceInitializationException
- -
-
setTypeSystemDescription
public void setTypeSystemDescription(TypeSystemDescription typeSystemDescription) throws ResourceInitializationException Sets the type system description.- Parameters:
typeSystemDescription
- the new type system description- Throws:
ResourceInitializationException
- the resource initialization exception
-
getAbsolutePathFromImport
Gets the absolute path from import.- Parameters:
importItem
- the import item- Returns:
- the absolute path from import
-
getAggregatePage
Gets the aggregate page.- Returns:
- the aggregate page
-
getOverviewPage
Gets the overview page.- Returns:
- the overview page
-
getParameterPage
Gets the parameter page.- Returns:
- the parameter page
-
getTypePage
Gets the type page.- Returns:
- the type page
-
getCapabilityPage
Gets the capability page.- Returns:
- the capability page
-
getIndexesPage
Gets the indexes page.- Returns:
- the indexes page
-
getResourcesPage
Gets the resources page.- Returns:
- the resources page
-
getXMLEditorPage
Gets the XML editor page.- Returns:
- the XML editor page
-
getSettingsPage
Gets the settings page.- Returns:
- the settings page
-
getFile
public org.eclipse.core.resources.IFile getFile()Gets the file.- Returns:
- current file being edited
-
getResolvedDelegates
Gets the resolved delegates.- Returns:
- the resolved delegates
-
getDelegateAEdescriptions
gets the Hash Map of resolved AE delegates Clones the description first because the getting updates it in some cases.- Parameters:
aed
- the aed- Returns:
- the Map of resolved AE delegates
-
markTCasDirty
public void markTCasDirty()Mark T cas dirty. -
getCurrentView
Gets the current view.- Returns:
- the current view
-
getProject
public org.eclipse.core.resources.IProject getProject()Gets the project.- Returns:
- the project
-
getDescriptorDirectory
Gets the descriptor directory.- Returns:
- the descriptor directory
-
getDescriptorRelativePath
Gets the descriptor relative path.- Parameters:
aFullOrRelativePath
- the a full or relative path- Returns:
- the descriptor relative path
-
isFileInWorkspace
Checks if is file in workspace.- Parameters:
aFileRelPath
- the a file rel path- Returns:
- true, if is file in workspace
-
getFullPathFromDescriptorRelativePath
Gets the full path from descriptor relative path.- Parameters:
aDescRelPath
- the a desc rel path- Returns:
- the full path from descriptor relative path
-
open
public void open(org.eclipse.core.resources.IFile fileToOpen) Open.- Parameters:
fileToOpen
- the file to open
-
openTextEditor
public void openTextEditor(org.eclipse.core.resources.IFile fileToOpen) Open text editor.- Parameters:
fileToOpen
- the file to open
-
getIFileOrFile
Gets the i file or file.- Parameters:
relOrAbsPath
- the rel or abs path- Returns:
- the i file or file
-
open
Open.- Parameters:
fullPath
- the full path
-
openTextEditor
Open text editor.- Parameters:
fullPath
- the full path
-
addDirtyTypeName
Adds the dirty type name.- Parameters:
typeName
- the type name
-
removeDirtyTypeName
Removes the dirty type name.- Parameters:
typeName
- the type name
-
doJCasGen
public void doJCasGen(org.eclipse.core.runtime.IProgressMonitor monitor) Do J cas gen.- Parameters:
monitor
- the monitor
-
getProjectClassPath
Gets the project class path.- Returns:
- the project class path
- Throws:
org.eclipse.core.runtime.CoreException
- the core exception
-
getFilteredProjectClassPath
public String getFilteredProjectClassPath(boolean filterCoreResources) throws org.eclipse.core.runtime.CoreException Gets the filtered project class path.- Parameters:
filterCoreResources
- the filter core resources- Returns:
- the filtered project class path
- Throws:
org.eclipse.core.runtime.CoreException
- the core exception
-
getPrimarySourceFolder
public org.eclipse.core.resources.IResource getPrimarySourceFolder()Gets the primary source folder.- Returns:
- the primary source folder
-
setSaveAsStatus
public void setSaveAsStatus(int nStatus) Sets the save as status.- Parameters:
nStatus
- the new save as status
-
getTypeSystemDescription
Gets the type system description.- Returns:
- the type system description
-
getTypePriorities
Gets the type priorities.- Returns:
- the type priorities
-
getFsIndexCollection
Gets the fs index collection.- Returns:
- the fs index collection
-
getExtResAndBindings
Gets the ext res and bindings.- Returns:
- the ext res and bindings
-
validateInputs
Validate inputs.- Parameters:
typeNameHash
- the type name hash- Returns:
- true, if successful
-
validateOutputs
Validate outputs.- Parameters:
typeNameHash
- the type name hash- Returns:
- true, if successful
-
validateIOs
Validate I os.- Parameters:
isValidateInputs
- the is validate inputstypeNameHash
- the type name hash- Returns:
- true, if successful
-
validateTypePriorities
Validate type priorities.- Parameters:
typeNameHash
- the type name hash- Returns:
- true, if successful
-
getDelegateResourceSpecifier
public static ResourceSpecifier getDelegateResourceSpecifier(org.eclipse.core.resources.IFile iFile, String[] componentHeaders) Used by code to get lists of delegate components by input/output type specs.- Parameters:
iFile
- the i filecomponentHeaders
- the component headers- Returns:
- the delegate resource specifier
-
getMessagesToRootCause
Gets the messages to root cause.- Parameters:
e
- the e- Returns:
- the messages to root cause
-
getFadeColor
public org.eclipse.swt.graphics.Color getFadeColor()Gets the fade color.- Returns:
- the fade color
-
setMergedTypeSystemDescription
Sets the merged type system description.- Parameters:
saved
- the new merged type system description
-
setImportedTypeSystemDescription
Sets the imported type system description.- Parameters:
saved
- the new imported type system description
-
setMergedTypeSystemDescription
Sets the merged type system description.- Throws:
ResourceInitializationException
- the resource initialization exception
-
getMergedTypeSystemDescription
Gets the merged type system description.- Returns:
- the merged type system description
-
getImportedTypeSystemDesription
Gets the imported type system desription.- Returns:
- the imported type system desription
-
setMergedFsIndexCollection
Sets the merged fs index collection.- Throws:
ResourceInitializationException
- the resource initialization exception
-
setMergedFsIndexCollection
Sets the merged fs index collection.- Parameters:
saved
- the new merged fs index collection
-
getMergedFsIndexCollection
Gets the merged fs index collection.- Returns:
- the merged fs index collection
-
setMergedTypePriorities
Sets the merged type priorities.- Throws:
ResourceInitializationException
- the resource initialization exception
-
setMergedTypePriorities
Sets the merged type priorities.- Parameters:
saved
- the new merged type priorities
-
getMergedTypePriorities
Gets the merged type priorities.- Returns:
- the merged type priorities
-
setResolvedFlowControllerDeclaration
Sets the resolved flow controller declaration.- Throws:
InvalidXMLException
- the invalid XML exception
-
getResolvedFlowControllerDeclaration
Gets the resolved flow controller declaration.- Returns:
- the resolved flow controller declaration
-
setResolvedExternalResourcesAndBindings
A Merge method doesn't "fit". merging isn't done over aggregates for these. Instead, the outer-most one "wins". But: resolving does fit. So we name this differently- Throws:
InvalidXMLException
- -
-
setResolvedExternalResourcesAndBindings
Sets the resolved external resources and bindings.- Parameters:
saved
- the new resolved external resources and bindings
-
getResolvedExternalResourcesAndBindings
Gets the resolved external resources and bindings.- Returns:
- the resolved external resources and bindings
-
getImportedFsIndexCollection
Gets the imported fs index collection.- Returns:
- the imported fs index collection
-
getImportedTypePriorities
Gets the imported type priorities.- Returns:
- the imported type priorities
-
getSourcePageEditor
public org.eclipse.ui.texteditor.ITextEditor getSourcePageEditor()Gets the source page editor.- Returns:
- the source page editor
-
getJavaProject
public org.eclipse.jdt.core.IJavaProject getJavaProject()Gets the java project.- Returns:
- the java project
-
getTypeFromProject
Gets the type from project.- Parameters:
typename
- the typename- Returns:
- the type from project
-
getAnalysisComponentIType
public org.eclipse.jdt.core.IType getAnalysisComponentIType()Gets the analysis component I type.- Returns:
- the analysis component I type
-
getBaseAnnotatorIType
public org.eclipse.jdt.core.IType getBaseAnnotatorIType()Gets the base annotator I type.- Returns:
- the base annotator I type
-
getCollectionReaderIType
public org.eclipse.jdt.core.IType getCollectionReaderIType()Gets the collection reader I type.- Returns:
- the collection reader I type
-
getCasInitializerIType
public org.eclipse.jdt.core.IType getCasInitializerIType()Gets the cas initializer I type.- Returns:
- the cas initializer I type
-
getCasConsumerIType
public org.eclipse.jdt.core.IType getCasConsumerIType()Gets the cas consumer I type.- Returns:
- the cas consumer I type
-
getFlowControllerIType
public org.eclipse.jdt.core.IType getFlowControllerIType()Gets the flow controller I type.- Returns:
- the flow controller I type
-
getSearchScopeForDescriptorType
public org.eclipse.jdt.core.search.IJavaSearchScope getSearchScopeForDescriptorType()Gets the search scope for descriptor type.- Returns:
- the search scope for descriptor type
-
createCas
public CAS createCas(AnalysisEngineDescription aAeDescription, Properties aPerformanceTuningSettings, ResourceManager aResourceManager) throws ResourceInitializationException Creates the cas.- Parameters:
aAeDescription
- the a ae descriptionaPerformanceTuningSettings
- the a performance tuning settingsaResourceManager
- the a resource manager- Returns:
- the cas
- Throws:
ResourceInitializationException
- the resource initialization exception
-