public class ProgramsEditor 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 |
ProgramsEditor.ReverseAdapterFactoryContentProvider |
| Constructor and Description |
|---|
ProgramsEditor()
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, setActiveEditorgetEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationDataaddPartPropertyListener, addPropertyListener, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, showBusypublic ProgramsEditor()
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 IEditingDomainProviderpublic 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 IViewerProviderpublic void createModel()
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception)
public void createPages()
createPages in class org.eclipse.ui.part.MultiPageEditorPartpublic Object getAdapter(Class key)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class org.eclipse.ui.part.MultiPageEditorPartpublic 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.ISaveablePartisDirty in class org.eclipse.ui.part.MultiPageEditorPartpublic void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
IEditorPart and simply saves the model file.
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPartpublic boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.ui.part.EditorPartpublic void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.ui.part.EditorPartpublic void gotoMarker(org.eclipse.core.resources.IMarker marker)
gotoMarker in interface org.eclipse.ui.ide.IGotoMarkerpublic void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
init in interface org.eclipse.ui.IEditorPartinit in class org.eclipse.ui.part.MultiPageEditorPartpublic void setFocus()
setFocus in interface org.eclipse.ui.IWorkbenchPartsetFocus in class org.eclipse.ui.part.MultiPageEditorPartpublic void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider.
addSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider.
removeSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic org.eclipse.jface.viewers.ISelection getSelection()
ISelectionProvider to return this editor's overall selection.
getSelection in interface org.eclipse.jface.viewers.ISelectionProviderpublic 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.ISelectionProviderpublic 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.IMenuListenerpublic EditingDomainActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public AdapterFactory getAdapterFactory()
public void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.MultiPageEditorPart