public class MechanicalComponentsEditor extends org.eclipse.ui.part.MultiPageEditorPart implements IEditingDomainProvider, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.jface.action.IMenuListener, IViewerProvider, org.eclipse.ui.ide.IGotoMarker
Modifier and Type | Class and Description |
---|---|
class |
MechanicalComponentsEditor.ReverseAdapterFactoryContentProvider |
Constructor and Description |
---|
MechanicalComponentsEditor()
This creates a model editor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements
ISelectionProvider . |
Diagnostic |
analyzeResourceProblems(Resource resource,
Exception exception)
Returns a diagnostic describing the errors and warnings listed in the resource
and the specified exception (if any).
|
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(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
This is for implementing
IEditorPart and simply saves the model file. |
void |
doSaveAs()
This also changes the editor's input.
|
EditingDomainActionBarContributor |
getActionBarContributor() |
org.eclipse.ui.IActionBars |
getActionBars() |
Object |
getAdapter(Class key)
This is how the framework determines which interfaces we implement.
|
AdapterFactory |
getAdapterFactory() |
org.eclipse.ui.views.contentoutline.IContentOutlinePage |
getContentOutlinePage()
This accesses a cached version of the content outliner.
|
EditingDomain |
getEditingDomain()
This returns the editing domain as required by the
IEditingDomainProvider interface. |
org.eclipse.ui.views.properties.IPropertySheetPage |
getPropertySheetPage()
This accesses a cached version of the property sheet.
|
org.eclipse.jface.viewers.ISelection |
getSelection()
This implements
ISelectionProvider to return this editor's overall selection. |
org.eclipse.jface.viewers.Viewer |
getViewer()
This returns the viewer as required by the
IViewerProvider interface. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker) |
void |
handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
This deals with how we want selection in the outliner to affect the other views.
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
This is called during startup.
|
boolean |
isDirty()
This is for implementing
IEditorPart and simply tests the command stack. |
boolean |
isSaveAsAllowed()
This always returns true because it is not currently supported.
|
void |
menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This implements
IMenuListener to help fill the context menus with contributions from the Edit menu. |
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements
ISelectionProvider . |
void |
setCurrentViewer(org.eclipse.jface.viewers.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 |
setCurrentViewerPane(ViewerPane viewerPane) |
void |
setFocus() |
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
This implements
ISelectionProvider to set this editor's overall selection. |
void |
setSelectionToViewer(Collection<?> collection)
This sets the selection into whichever viewer is active.
|
void |
setStatusLineManager(org.eclipse.jface.viewers.ISelection selection) |
addPage, addPage, addPage, addPage, addPageChangedListener, createPartControl, findEditors, getActivePage, getSelectedPage, removePage, removePageChangedListener, setActiveEditor
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData
addPartPropertyListener, addPropertyListener, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
public MechanicalComponentsEditor()
public void setSelectionToViewer(Collection<?> collection)
public EditingDomain getEditingDomain()
IEditingDomainProvider
interface.
This is important for implementing the static methods of AdapterFactoryEditingDomain
and for supporting CommandAction
.
getEditingDomain
in interface IEditingDomainProvider
public void setCurrentViewerPane(ViewerPane viewerPane)
public void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
public org.eclipse.jface.viewers.Viewer getViewer()
IViewerProvider
interface.
getViewer
in interface IViewerProvider
public void createModel()
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception)
public void createPages()
createPages
in class org.eclipse.ui.part.MultiPageEditorPart
public Object getAdapter(Class key)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class org.eclipse.ui.part.MultiPageEditorPart
public org.eclipse.ui.views.contentoutline.IContentOutlinePage getContentOutlinePage()
public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
public void handleContentOutlineSelection(org.eclipse.jface.viewers.ISelection selection)
public boolean isDirty()
IEditorPart
and simply tests the command stack.
isDirty
in interface org.eclipse.ui.ISaveablePart
isDirty
in class org.eclipse.ui.part.MultiPageEditorPart
public void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
IEditorPart
and simply saves the model file.
doSave
in interface org.eclipse.ui.ISaveablePart
doSave
in class org.eclipse.ui.part.EditorPart
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface org.eclipse.ui.ISaveablePart
isSaveAsAllowed
in class org.eclipse.ui.part.EditorPart
public void doSaveAs()
doSaveAs
in interface org.eclipse.ui.ISaveablePart
doSaveAs
in class org.eclipse.ui.part.EditorPart
public void gotoMarker(org.eclipse.core.resources.IMarker marker)
gotoMarker
in interface org.eclipse.ui.ide.IGotoMarker
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)
init
in interface org.eclipse.ui.IEditorPart
init
in class org.eclipse.ui.part.MultiPageEditorPart
public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.MultiPageEditorPart
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
addSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
removeSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public org.eclipse.jface.viewers.ISelection getSelection()
ISelectionProvider
to return this editor's overall selection.
getSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void setSelection(org.eclipse.jface.viewers.ISelection selection)
ISelectionProvider
to set this editor's overall selection.
Calling this result will notify the listeners.
setSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
IMenuListener
to help fill the context menus with contributions from the Edit menu.
menuAboutToShow
in interface org.eclipse.jface.action.IMenuListener
public EditingDomainActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public AdapterFactory getAdapterFactory()
public void dispose()
dispose
in interface org.eclipse.ui.IWorkbenchPart
dispose
in class org.eclipse.ui.part.MultiPageEditorPart