public class JavaActionBarContributor extends EditingDomainActionBarContributor
| Modifier and Type | Field and Description |
|---|---|
protected IEditorPart |
activeEditorPart
This keeps track of the active editor
|
protected IAction |
refreshViewerAction
This action refreshes the viewer of the current editor if the editor
implements
IViewerProvider |
protected ISelectionProvider |
selectionProvider
This keeps track of the current selection provider
|
protected IAction |
showPropertiesViewAction
This action opens the Properties view
|
activeEditor, ADDITIONS_LAST_STYLE, controlAction, copyAction, cutAction, deleteAction, liveValidationAction, loadResourceAction, pasteAction, redoAction, style, undoAction, validateAction| Constructor and Description |
|---|
JavaActionBarContributor()
This creates an instance of the contributor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGlobalActions(IMenuManager menuManager)
This inserts global actions before the "additions-end" separator
|
void |
contributeToMenu(IMenuManager menuManager)
This adds to the menu bar a menu and some separators for editor additions,
as well as the sub-menus for object creation items
|
void |
contributeToToolBar(IToolBarManager toolBarManager)
This adds Separators for editor additions to the tool bar
|
void |
menuAboutToShow(IMenuManager menuManager)
This populates the pop-up menu before it appears
|
protected boolean |
removeAllReferencesOnDelete()
This ensures that a delete action will clean up all references to deleted objects
|
void |
selectionChanged(SelectionChangedEvent event)
This implements
org.eclipse.jface.viewers.ISelectionChangedListener,
handling org.eclipse.jface.viewers.SelectionChangedEvents by querying for the children and siblings
that can be added to the selected object and updating the menus accordingly |
void |
setActiveEditor(IEditorPart part)
When the active editor changes, this remembers the change and registers with it as a selection provider
|
activate, contributeToStatusLine, createCopyAction, createCutAction, createDeleteAction, createPasteAction, createRedoAction, createUndoAction, deactivate, getActiveEditor, init, propertyChanged, setActivePage, setActiveView, shareGlobalActions, updateprotected IEditorPart activeEditorPart
protected ISelectionProvider selectionProvider
protected IAction showPropertiesViewAction
protected IAction refreshViewerAction
IViewerProvider.
public JavaActionBarContributor()
public void contributeToToolBar(IToolBarManager toolBarManager)
contributeToToolBar in class EditingDomainActionBarContributorpublic void contributeToMenu(IMenuManager menuManager)
contributeToMenu in class EditingDomainActionBarContributorpublic void setActiveEditor(IEditorPart part)
setActiveEditor in class EditingDomainActionBarContributorpublic void selectionChanged(SelectionChangedEvent event)
org.eclipse.jface.viewers.ISelectionChangedListener,
handling org.eclipse.jface.viewers.SelectionChangedEvents by querying for the children and siblings
that can be added to the selected object and updating the menus accordingly.
public void menuAboutToShow(IMenuManager menuManager)
menuAboutToShow in class EditingDomainActionBarContributorprotected void addGlobalActions(IMenuManager menuManager)
addGlobalActions in class EditingDomainActionBarContributorprotected boolean removeAllReferencesOnDelete()
removeAllReferencesOnDelete in class EditingDomainActionBarContributor