public class EsxEditor
extends MultiPageEditorPart
Modifier and Type | Class and Description |
---|---|
class |
EsxEditor.ReverseAdapterFactoryContentProvider |
Modifier and Type | Field and Description |
---|---|
protected ComposedAdapterFactory |
adapterFactory
This is the one adapter factory used for providing views of the model.
|
static java.util.List<java.lang.String> |
AUDIO_FILE_EXTENSION_FILTERS
The filters for audio file extensions supported by the editor.
|
protected java.util.Collection<Resource> |
changedResources
Resources that have been changed since last activation.
|
protected IContentOutlinePage |
contentOutlinePage
This is the content outline page.
|
protected IStatusLineManager |
contentOutlineStatusLineManager
This is a kludge...
|
protected TreeViewer |
contentOutlineViewer
This is the content outline page's viewer.
|
protected Viewer |
currentViewer
This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
|
protected AdapterFactoryEditingDomain |
editingDomain
This keeps track of the editing domain that is used to track all changes to the model.
|
static java.util.List<java.lang.String> |
FILE_EXTENSION_FILTERS
The filters for file extensions supported by the editor.
|
protected EsxEditorPartGlobal |
partGlobal
This is the editor for the global parameters in an esx file.
|
protected EsxEditorPartInfo |
partInfo
This is the editor for the overview/summary/info in an esx file.
|
protected IPartListener |
partListener
This listens for when the outline becomes active
|
protected EsxEditorPartPatterns |
partPatterns
This is the editor for the patterns in an esx file.
|
protected EsxEditorPartSamples |
partSamples
This is the editor for the samples in an esx file.
|
protected EsxEditorPartSongs |
partSongs
This is the editor for the songs in an esx file.
|
protected EContentAdapter |
problemIndicationAdapter
Adapter used to update the problem indication when resources are demanded loaded.
|
protected PropertySheetPage |
propertySheetPage
This is the property sheet page.
|
protected java.util.Collection<Resource> |
removedResources
Resources that have been removed since last activation.
|
protected java.util.Map<Resource,Diagnostic> |
resourceToDiagnosticMap
Map to store the diagnostic associated with a resource.
|
protected java.util.Collection<Resource> |
savedResources
Resources that have been saved.
|
protected MultiPageSelectionProvider |
selectionProvider |
protected boolean |
updateProblemIndication
Controls whether the problem indication should be updated.
|
Constructor and Description |
---|
EsxEditor()
This creates a model editor.
|
Modifier and Type | Method and Description |
---|---|
Diagnostic |
analyzeResourceProblems(Resource resource,
java.lang.Exception exception)
Returns a diagnostic describing the errors and warnings listed in the resource
and the specified exception (if any).
|
protected void |
createContextMenuFor(StructuredViewer viewer)
This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
|
void |
createModel()
This is the method called to load a resource into the editing domain's resource set based on the editor's input.
|
void |
createPages()
This is the method used by the framework to install your own controls.
|
void |
dispose() |
void |
doSave(IProgressMonitor progressMonitor)
This is for implementing
IEditorPart and simply saves the model file. |
void |
doSaveAs()
This also changes the editor's input.
|
protected void |
doSaveAs(URI uri,
IEditorInput editorInput) |
protected void |
firePropertyChange(int action)
This is here for the listener to be able to call it.
|
EditingDomainActionBarContributor |
getActionBarContributor() |
IActionBars |
getActionBars() |
java.lang.Object |
getAdapter(java.lang.Class key)
This is how the framework determines which interfaces we implement.
|
AdapterFactory |
getAdapterFactory() |
IContentOutlinePage |
getContentOutlinePage()
This accesses a cached version of the content outliner.
|
EditingDomain |
getEditingDomain()
This returns the editing domain as required by the
IEditingDomainProvider interface. |
EsxEditorPart |
getEsxEditorPart(int pageIndex) |
IPropertySheetPage |
getPropertySheetPage()
This accesses a cached version of the property sheet.
|
Viewer |
getViewer()
This returns the viewer as required by the
IViewerProvider interface. |
protected void |
handleActivate()
Handles activation of the editor or it's associated views.
|
protected void |
handleChangedResources()
Handles what to do with changed resources on activation.
|
void |
handleContentOutlineSelection(ISelection selection)
This deals with how we want selection in the outliner to affect the other views.
|
protected boolean |
handleDirtyConflict()
Shows a dialog that asks if conflicting changes should be discarded.
|
protected void |
hideTabs()
If there is just one page in the multi-page editor part,
this hides the single tab at the bottom.
|
void |
init(IEditorSite site,
IEditorInput editorInput)
This is called during startup.
|
protected void |
initializeEditingDomain()
This sets up the editing domain for the model editor.
|
boolean |
isDirty()
This is for implementing
IEditorPart and simply tests the command stack. |
protected boolean |
isPersisted(Resource resource)
This returns whether something has been persisted to the URI of the specified resource.
|
boolean |
isSaveAsAllowed()
This always returns true because it is not currently supported.
|
void |
menuAboutToShow(IMenuManager menuManager)
This implements
org.eclipse.jface.action.IMenuListener to help fill the context menus with contributions from the Edit menu. |
protected void |
pageChange(int pageIndex)
This is used to track the active viewer.
|
void |
setActivePage(int pageIndex) |
void |
setCurrentViewer(Viewer viewer)
This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
is the current one.
|
void |
setSelectionToViewer(java.util.Collection<?> collection)
This sets the selection into whichever viewer is active.
|
void |
setStatusLineManager(ISelection selection) |
protected boolean |
showOutlineView()
Returns whether the outline view should be presented to the user.
|
protected void |
showTabs()
If there is more than one page in the multi-page editor part,
this shows the tabs at the bottom.
|
protected void |
updateProblemIndication()
Updates the problems indication with the information described in the specified diagnostic.
|
public static final java.util.List<java.lang.String> FILE_EXTENSION_FILTERS
public static final java.util.List<java.lang.String> AUDIO_FILE_EXTENSION_FILTERS
protected AdapterFactoryEditingDomain editingDomain
protected ComposedAdapterFactory adapterFactory
protected MultiPageSelectionProvider selectionProvider
protected IContentOutlinePage contentOutlinePage
protected IStatusLineManager contentOutlineStatusLineManager
protected TreeViewer contentOutlineViewer
protected PropertySheetPage propertySheetPage
protected EsxEditorPartInfo partInfo
protected EsxEditorPartGlobal partGlobal
protected EsxEditorPartSamples partSamples
protected EsxEditorPartPatterns partPatterns
protected EsxEditorPartSongs partSongs
protected Viewer currentViewer
protected IPartListener partListener
protected java.util.Collection<Resource> removedResources
protected java.util.Collection<Resource> changedResources
protected java.util.Collection<Resource> savedResources
protected java.util.Map<Resource,Diagnostic> resourceToDiagnosticMap
protected boolean updateProblemIndication
protected EContentAdapter problemIndicationAdapter
protected void handleActivate()
protected void handleChangedResources()
protected void updateProblemIndication()
protected boolean handleDirtyConflict()
protected void initializeEditingDomain()
protected void firePropertyChange(int action)
public void setSelectionToViewer(java.util.Collection<?> collection)
public EditingDomain getEditingDomain()
IEditingDomainProvider
interface.
This is important for implementing the static methods of AdapterFactoryEditingDomain
and for supporting org.eclipse.emf.edit.ui.action.CommandAction
.
public void setCurrentViewer(Viewer viewer)
public Viewer getViewer()
IViewerProvider
interface.
protected void createContextMenuFor(StructuredViewer viewer)
public void createModel()
public Diagnostic analyzeResourceProblems(Resource resource, java.lang.Exception exception)
public void setActivePage(int pageIndex)
public void createPages()
protected void hideTabs()
protected void showTabs()
protected void pageChange(int pageIndex)
public java.lang.Object getAdapter(java.lang.Class key)
public IContentOutlinePage getContentOutlinePage()
public IPropertySheetPage getPropertySheetPage()
public void handleContentOutlineSelection(ISelection selection)
public boolean isDirty()
IEditorPart
and simply tests the command stack.
public void doSave(IProgressMonitor progressMonitor)
IEditorPart
and simply saves the model file.
This passes in a ProgressMonitor as a save option to the resource.
protected boolean isPersisted(Resource resource)
public boolean isSaveAsAllowed()
public void doSaveAs()
protected void doSaveAs(URI uri, IEditorInput editorInput)
public void init(IEditorSite site, IEditorInput editorInput)
public void setStatusLineManager(ISelection selection)
public void menuAboutToShow(IMenuManager menuManager)
org.eclipse.jface.action.IMenuListener
to help fill the context menus with contributions from the Edit menu.
public EditingDomainActionBarContributor getActionBarContributor()
public IActionBars getActionBars()
public AdapterFactory getAdapterFactory()
public void dispose()
protected boolean showOutlineView()
public EsxEditorPart getEsxEditorPart(int pageIndex)