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.
de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.DatatypesActionBarContributor | ( | ) |
This creates an instance of the contributor.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.addGlobalActions | ( | IMenuManager | menuManager | ) | [protected] |
This inserts global actions before the "additions-end" separator.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.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 de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.contributeToToolBar | ( | IToolBarManager | toolBarManager | ) |
This adds Separators for editor additions to the tool bar.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.depopulateManager | ( | IContributionManager | manager, | |
Collection<?extends IAction > | actions | |||
) | [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.
Collection<IAction> de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.generateCreateChildActions | ( | Collection<?> | descriptors, | |
ISelection | selection | |||
) | [protected] |
This generates a org.eclipse.emf.edit.ui.action.CreateChildAction for each object in descriptors
, and returns the collection of these actions.
Collection<IAction> de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.generateCreateSiblingActions | ( | Collection<?> | descriptors, | |
ISelection | selection | |||
) | [protected] |
This generates a org.eclipse.emf.edit.ui.action.CreateSiblingAction for each object in descriptors
, and returns the collection of these actions.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.menuAboutToShow | ( | IMenuManager | menuManager | ) |
This populates the pop-up menu before it appears.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.populateManager | ( | IContributionManager | manager, | |
Collection<?extends IAction > | actions, | |||
String | contributionID | |||
) | [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.
boolean de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.removeAllReferencesOnDelete | ( | ) | [protected] |
This ensures that a delete action will clean up all references to deleted objects.
void de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.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 de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.setActiveEditor | ( | IEditorPart | part | ) |
When the active editor changes, this remembers the change and registers with it as a selection provider.
IEditorPart de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.activeEditorPart [protected] |
This keeps track of the active editor.
Collection<IAction> de.fraunhofer.isst.eastadl.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.
IMenuManager de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.createChildMenuManager [protected] |
This is the menu manager into which menu contribution items should be added for CreateChild actions.
Collection<IAction> de.fraunhofer.isst.eastadl.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.
IMenuManager de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.createSiblingMenuManager [protected] |
This is the menu manager into which menu contribution items should be added for CreateSibling actions.
IAction de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.refreshViewerAction [protected] |
new Action(EastEditorPlugin.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.
ISelectionProvider de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.selectionProvider [protected] |
This keeps track of the current selection provider.
IAction de.fraunhofer.isst.eastadl.datatypes.presentation.DatatypesActionBarContributor.showPropertiesViewAction [protected] |
new Action(EastEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { @Override public void run() { try { getPage().showView("org.eclipse.ui.views.PropertySheet"); } catch (PartInitException exception) { EastEditorPlugin.INSTANCE.log(exception); } } }
This action opens the Properties view.