|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.amp.amf.testing.ares.presentation.AresEditor
public class AresEditor
This is an example of a Ares model editor.
| Nested Class Summary | |
|---|---|
class |
AresEditor.ReverseAdapterFactoryContentProvider
|
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
AresEditor()
This creates a model editor. |
|
| Method Summary | |
|---|---|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider. |
org.eclipse.emf.common.util.Diagnostic |
analyzeResourceProblems(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.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. |
org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor |
getActionBarContributor()
|
org.eclipse.ui.IActionBars |
getActionBars()
|
java.lang.Object |
getAdapter(java.lang.Class key)
This is how the framework determines which interfaces we implement. |
org.eclipse.emf.common.notify.AdapterFactory |
getAdapterFactory()
|
org.eclipse.ui.views.contentoutline.IContentOutlinePage |
getContentOutlinePage()
This accesses a cached version of the content outliner. |
org.eclipse.emf.edit.domain.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(org.eclipse.emf.common.ui.ViewerPane viewerPane)
|
void |
setFocus()
|
void |
setSelection(org.eclipse.jface.viewers.ISelection selection)
This implements ISelectionProvider to set this editor's overall selection. |
void |
setSelectionToViewer(java.util.Collection<?> collection)
This sets the selection into whichever viewer is active. |
void |
setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
|
| Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
|---|
addPage, addPage, addPage, addPage, addPageChangedListener, createPartControl, findEditors, getActivePage, getSelectedPage, removePage, removePageChangedListener, setActiveEditor |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
|---|
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPartPropertyListener, addPropertyListener, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener |
| Constructor Detail |
|---|
public AresEditor()
| Method Detail |
|---|
public void setSelectionToViewer(java.util.Collection<?> collection)
public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
IEditingDomainProvider interface.
This is important for implementing the static methods of AdapterFactoryEditingDomain
and for supporting CommandAction.
getEditingDomain in interface org.eclipse.emf.edit.domain.IEditingDomainProviderpublic void setCurrentViewerPane(org.eclipse.emf.common.ui.ViewerPane viewerPane)
public void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
public org.eclipse.jface.viewers.Viewer getViewer()
IViewerProvider interface.
getViewer in interface org.eclipse.emf.common.ui.viewer.IViewerProviderpublic void createModel()
public org.eclipse.emf.common.util.Diagnostic analyzeResourceProblems(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Exception exception)
public void createPages()
createPages in class org.eclipse.ui.part.MultiPageEditorPartpublic java.lang.Object getAdapter(java.lang.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.IGotoMarker
public 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 org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public org.eclipse.emf.common.notify.AdapterFactory getAdapterFactory()
public void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.MultiPageEditorPart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||