org.eclipse.emf.codegen.ecore.genmodel.presentation
Class GenModelActionBarContributor
java.lang.Object
|
+--org.eclipse.ui.part.EditorActionBarContributor
|
+--org.eclipse.ui.part.MultiPageEditorActionBarContributor
|
+--org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor
|
+--org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelActionBarContributor
- All Implemented Interfaces:
- org.eclipse.ui.IEditorActionBarContributor, org.eclipse.jface.action.IMenuListener, org.eclipse.ui.IPropertyListener, org.eclipse.jface.viewers.ISelectionChangedListener
- public class GenModelActionBarContributor
- extends EditingDomainActionBarContributor
- implements org.eclipse.jface.viewers.ISelectionChangedListener
This is the action bar contributor for the GenModel model editor.
Method Summary |
void |
contributeToMenu(org.eclipse.jface.action.IMenuManager menuManager)
This adds menu contributions for the generate actions. |
void |
contributeToToolBar(org.eclipse.jface.action.IToolBarManager toolBarManager)
This adds Separators for editor additions to the tool bar. |
protected org.eclipse.jface.viewers.ISelection |
getActiveEditorSelection()
This gets the selection from the active editor. |
void |
menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
This populates the pop-up menu before it appears. |
void |
selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
This implements ISelectionChangedListener , refreshing the
"Generate..." action contribution managers in the pull-down menu. |
void |
setActiveEditor(org.eclipse.ui.IEditorPart part)
When the active editor changes, this remembers the change, |
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor |
dispose, getActionBars, getPage, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
activeEditorPart
protected org.eclipse.ui.IEditorPart activeEditorPart
- This keeps track of the active editor.
selectionProvider
protected org.eclipse.jface.viewers.ISelectionProvider selectionProvider
- This keeps track of the current selection provider.
generateMenuManager
protected org.eclipse.jface.action.IMenuManager generateMenuManager
- This is the menu manager for the "Generate" menu.
reloadAction
protected org.eclipse.jface.action.Action reloadAction
generateAction
protected org.eclipse.jface.action.Action generateAction
generateEditAction
protected org.eclipse.jface.action.Action generateEditAction
generateEditorAction
protected org.eclipse.jface.action.Action generateEditorAction
generateAllAction
protected org.eclipse.jface.action.Action generateAllAction
GenModelActionBarContributor
public GenModelActionBarContributor()
- This creates an instance of the contributor.
getActiveEditorSelection
protected org.eclipse.jface.viewers.ISelection getActiveEditorSelection()
- This gets the selection from the active editor.
contributeToMenu
public void contributeToMenu(org.eclipse.jface.action.IMenuManager menuManager)
- This adds menu contributions for the generate actions.
- Overrides:
contributeToMenu
in class EditingDomainActionBarContributor
contributeToToolBar
public void contributeToToolBar(org.eclipse.jface.action.IToolBarManager toolBarManager)
- This adds Separators for editor additions to the tool bar.
- Overrides:
contributeToToolBar
in class EditingDomainActionBarContributor
setActiveEditor
public void setActiveEditor(org.eclipse.ui.IEditorPart part)
- When the active editor changes, this remembers the change,
- Overrides:
setActiveEditor
in class EditingDomainActionBarContributor
selectionChanged
public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
- This implements
ISelectionChangedListener
, refreshing the
"Generate..." action contribution managers in the pull-down menu.
- Specified by:
selectionChanged
in interface org.eclipse.jface.viewers.ISelectionChangedListener
menuAboutToShow
public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menuManager)
- This populates the pop-up menu before it appears.
- Overrides:
menuAboutToShow
in class EditingDomainActionBarContributor