Public Member Functions | Protected Member Functions | Protected Attributes
org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor Class Reference
Inheritance diagram for org.best_of_robotics.model.datatypes.presentation.DatatypesActionBarContributor:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

This is the action bar contributor for the Datatypes model editor.

Definition at line 52 of file DatatypesActionBarContributor.java.


Constructor & Destructor Documentation

This creates an instance of the contributor.

Definition at line 155 of file DatatypesActionBarContributor.java.


Member Function Documentation

This inserts global actions before the "additions-end" separator.

Definition at line 406 of file DatatypesActionBarContributor.java.

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.

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.

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.

This ensures that a delete action will clean up all references to deleted objects.

Definition at line 423 of file DatatypesActionBarContributor.java.

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.

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.


Member Data Documentation

This keeps track of the active editor.

Definition at line 61 of file DatatypesActionBarContributor.java.

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.

This is the menu manager into which menu contribution items should be added for CreateChild actions.

Definition at line 130 of file DatatypesActionBarContributor.java.

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.

This is the menu manager into which menu contribution items should be added for CreateSibling actions.

Definition at line 147 of file DatatypesActionBarContributor.java.

Initial value:
                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.

This keeps track of the current selection provider.

Definition at line 69 of file DatatypesActionBarContributor.java.

Initial value:
                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.


The documentation for this class was generated from the following file:


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Sun Oct 5 2014 22:38:35