|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor
This is an example of a GenModel model editor.
Inner Class Summary | |
class |
GenModelEditor.ReverseAdapterFactoryContentProvider
|
Field Summary | |
protected ComposedAdapterFactory |
adapterFactory
This is the one adapter factory used for providing views of the model. |
protected org.eclipse.jface.viewers.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. |
protected org.eclipse.jface.viewers.ISelection |
editorSelection
This keeps track of the selection of the editor as a whole. |
protected org.eclipse.ui.IPartListener |
partListener
This listens for when the outline becomes active |
protected org.eclipse.ui.views.properties.PropertySheetPage |
propertySheetPage
This is the property sheet page. |
protected org.eclipse.core.resources.IResourceChangeListener |
resourceChangeListener
This listens for workspace changes. |
protected org.eclipse.jface.viewers.ISelectionChangedListener |
selectionChangedListener
This listens to which ever viewer is active. |
protected java.util.Collection |
selectionChangedListeners
This keeps track of all the ISelectionChangedListener s that are listening to this editor. |
Constructor Summary | |
GenModelEditor()
This creates a model editor. |
Method Summary | |
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
This implements ISelectionProvider . |
protected void |
createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
This creates a context menu for the viewer and adds a listener as well registering the menu for extension. |
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. |
protected void |
firePropertyChange(int action)
This is here for the listener to be able to call it. |
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. |
AdapterFactory |
getAdapterFactory()
|
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. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
void |
handleActivate()
Handles activation of the editor or it's associated views. |
protected void |
handleChangedResources()
Handles what to do with changed resources on activation. |
protected boolean |
handleDirtyConflict()
Shows a dialog that asks if conflicting changes should be discarded. |
protected void |
hideTabs()
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
This is called during startup. |
protected void |
initialize(GenModel genModel)
|
boolean |
isDirty()
This is for implementing IEditorPart and simply tests the command stack. |
boolean |
isSaveAsAllowed()
This always returns false because it is not current supported. |
void |
menuAboutToShow(org.eclipse.jface.action.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 |
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 |
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)
|
void |
validate()
|
Field Detail |
protected AdapterFactoryEditingDomain editingDomain
protected ComposedAdapterFactory adapterFactory
protected org.eclipse.ui.views.properties.PropertySheetPage propertySheetPage
protected org.eclipse.jface.viewers.Viewer currentViewer
protected org.eclipse.jface.viewers.ISelectionChangedListener selectionChangedListener
protected java.util.Collection selectionChangedListeners
ISelectionChangedListener
s that are listening to this editor.
protected org.eclipse.jface.viewers.ISelection editorSelection
protected org.eclipse.ui.IPartListener partListener
protected org.eclipse.core.resources.IResourceChangeListener resourceChangeListener
Constructor Detail |
public GenModelEditor()
Method Detail |
public void handleActivate()
protected void handleChangedResources()
protected void initialize(GenModel genModel)
protected boolean handleDirtyConflict()
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 CommandAction
.
getEditingDomain
in interface IEditingDomainProvider
public void setCurrentViewer(org.eclipse.jface.viewers.Viewer viewer)
protected void createContextMenuFor(org.eclipse.jface.viewers.StructuredViewer viewer)
public void createPages()
protected void hideTabs()
protected void pageChange(int pageIndex)
public java.lang.Object getAdapter(java.lang.Class key)
public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetPage()
public boolean isDirty()
IEditorPart
and simply tests the command stack.
public void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
IEditorPart
and simply saves the model file.
public boolean isSaveAsAllowed()
public void doSaveAs()
public void gotoMarker(org.eclipse.core.resources.IMarker marker)
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException, org.eclipse.ui.PartInitException
public void setFocus()
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
ISelectionProvider
.
public org.eclipse.jface.viewers.ISelection getSelection()
ISelectionProvider
to return this editor's overall selection.
public void setSelection(org.eclipse.jface.viewers.ISelection selection)
ISelectionProvider
to set this editor's overall selection.
Calling this result will notify the listeners.
public void setStatusLineManager(org.eclipse.jface.viewers.ISelection selection)
public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
org.eclipse.jface.action.IMenuListener
to help fill the context menus with contributions from the Edit menu.
public EditingDomainActionBarContributor getActionBarContributor()
public org.eclipse.ui.IActionBars getActionBars()
public AdapterFactory getAdapterFactory()
public void dispose()
public void validate()
|
Copyright 2001-2002 IBM Corporation and others. All Rights Reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |