Public Member Functions | |
void | contributeToMenu (IMenuManager menuManager) |
void | contributeToToolBar (IToolBarManager toolBarManager) |
DatatypesActionBarContributor () | |
void | menuAboutToShow (IMenuManager menuManager) |
void | selectionChanged (SelectionChangedEvent event) |
void | setActiveEditor (IEditorPart part) |
Protected Member Functions | |
void | addGlobalActions (IMenuManager menuManager) |
void | depopulateManager (IContributionManager manager, Collection<?extends IAction > actions) |
Collection< IAction > | generateCreateChildActions (Collection<?> descriptors, ISelection selection) |
Collection< IAction > | generateCreateSiblingActions (Collection<?> descriptors, ISelection selection) |
void | populateManager (IContributionManager manager, Collection<?extends IAction > actions, String contributionID) |
boolean | removeAllReferencesOnDelete () |
Protected Attributes | |
IEditorPart | activeEditorPart |
Collection< IAction > | createChildActions |
IMenuManager | createChildMenuManager |
Collection< IAction > | createSiblingActions |
IMenuManager | createSiblingMenuManager |
IAction | refreshViewerAction |
ISelectionProvider | selectionProvider |
IAction | showPropertiesViewAction |
This is the action bar contributor for the Datatypes model editor.
Definition at line 52 of file DatatypesActionBarContributor.java.
org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.DatatypesActionBarContributor | ( | ) | [inline] |
This creates an instance of the contributor.
Definition at line 155 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.addGlobalActions | ( | IMenuManager | menuManager | ) | [inline, protected] |
This inserts global actions before the "additions-end" separator.
Definition at line 406 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.contributeToMenu | ( | IMenuManager | menuManager | ) | [inline] |
This adds to the menu bar a menu and some separators for editor additions, as well as the sub-menus for object creation items.
Definition at line 182 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.contributeToToolBar | ( | IToolBarManager | toolBarManager | ) | [inline] |
This adds Separators for editor additions to the tool bar.
Definition at line 169 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.depopulateManager | ( | IContributionManager | manager, |
Collection<?extends IAction > | actions | ||
) | [inline, protected] |
This removes from the specified manager
all org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions
collection.
Definition at line 356 of file DatatypesActionBarContributor.java.
Collection<IAction> org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.generateCreateChildActions | ( | Collection<?> | descriptors, |
ISelection | selection | ||
) | [inline, protected] |
This generates a org.eclipse.emf.edit.ui.action.CreateChildAction for each object in descriptors
, and returns the collection of these actions.
Definition at line 300 of file DatatypesActionBarContributor.java.
Collection<IAction> org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.generateCreateSiblingActions | ( | Collection<?> | descriptors, |
ISelection | selection | ||
) | [inline, protected] |
This generates a org.eclipse.emf.edit.ui.action.CreateSiblingAction for each object in descriptors
, and returns the collection of these actions.
Definition at line 317 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.menuAboutToShow | ( | IMenuManager | menuManager | ) | [inline] |
This populates the pop-up menu before it appears.
Definition at line 386 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.populateManager | ( | IContributionManager | manager, |
Collection<?extends IAction > | actions, | ||
String | contributionID | ||
) | [inline, protected] |
This populates the specified manager
with org.eclipse.jface.action.ActionContributionItems based on the org.eclipse.jface.action.IActions contained in the actions
collection, by inserting them before the specified contribution item contributionID
. If contributionID
is null
, they are simply added.
Definition at line 336 of file DatatypesActionBarContributor.java.
boolean org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.removeAllReferencesOnDelete | ( | ) | [inline, protected] |
This ensures that a delete action will clean up all references to deleted objects.
Definition at line 423 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.selectionChanged | ( | SelectionChangedEvent | event | ) | [inline] |
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.
Definition at line 253 of file DatatypesActionBarContributor.java.
void org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.setActiveEditor | ( | IEditorPart | part | ) | [inline] |
When the active editor changes, this remembers the change and registers with it as a selection provider.
Definition at line 221 of file DatatypesActionBarContributor.java.
IEditorPart org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.activeEditorPart [protected] |
This keeps track of the active editor.
Definition at line 61 of file DatatypesActionBarContributor.java.
Collection<IAction> org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.createChildActions [protected] |
This will contain one org.eclipse.emf.edit.ui.action.CreateChildAction corresponding to each descriptor generated for the current selection by the item provider.
Definition at line 122 of file DatatypesActionBarContributor.java.
IMenuManager org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.createChildMenuManager [protected] |
This is the menu manager into which menu contribution items should be added for CreateChild actions.
Definition at line 130 of file DatatypesActionBarContributor.java.
Collection<IAction> org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.createSiblingActions [protected] |
This will contain one org.eclipse.emf.edit.ui.action.CreateSiblingAction corresponding to each descriptor generated for the current selection by the item provider.
Definition at line 139 of file DatatypesActionBarContributor.java.
IMenuManager org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.createSiblingMenuManager [protected] |
This is the menu manager into which menu contribution items should be added for CreateSibling actions.
Definition at line 147 of file DatatypesActionBarContributor.java.
IAction org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.refreshViewerAction [protected] |
new Action(DataTypesEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { @Override public boolean isEnabled() { return activeEditorPart instanceof IViewerProvider; } @Override public void run() { if (activeEditorPart instanceof IViewerProvider) { Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); if (viewer != null) { viewer.refresh(); } } } }
This action refreshes the viewer of the current editor if the editor implements org.eclipse.emf.common.ui.viewer.IViewerProvider.
Definition at line 97 of file DatatypesActionBarContributor.java.
ISelectionProvider org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.selectionProvider [protected] |
This keeps track of the current selection provider.
Definition at line 69 of file DatatypesActionBarContributor.java.
IAction org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor.showPropertiesViewAction [protected] |
new Action(DataTypesEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { @Override public void run() { try { getPage().showView("org.eclipse.ui.views.PropertySheet"); } catch (PartInitException exception) { DataTypesEditorPlugin.INSTANCE.log(exception); } } }
This action opens the Properties view.
Definition at line 77 of file DatatypesActionBarContributor.java.