Class NestingCommonModelElementsInStereotypeApplications
java.lang.Object
org.modelversioning.emfprofile.application.registry.ui.observer.NestingCommonModelElementsInStereotypeApplications
- All Implemented Interfaces:
IMenuListener
,ISelectionChangedListener
public class NestingCommonModelElementsInStereotypeApplications
extends Object
implements ISelectionChangedListener, IMenuListener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contributeToMenu
(IMenuManager menuManager) This adds to the context menu a menu and the sub-menus for object creation items.void
depopulateManager
(IContributionManager manager, Collection<? extends IAction> actions) This removes from the specifiedmanager
allActionContributionItem
s based on theIAction
s contained in theactions
collection.void
menuAboutToShow
(IMenuManager menuManager) This populates the pop-up menu before it appears.void
populateManager
(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) This populates the specifiedmanager
withActionContributionItem
s based on theIAction
s contained in theactions
collection, by inserting them before the specified contribution itemcontributionID
.void
This implementsISelectionChangedListener
, handlingSelectionChangedEvent
s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly.
-
Field Details
-
NESTING_COMMON_MODEL_ELEMENTS_MENU_NAME
- See Also:
-
NESTING_COMMON_MODEL_ELEMENTS_MENU_ID
- See Also:
-
UI_CREATE_CHILD_MENU_ITEM
- See Also:
-
UI_CREATE_SIBLING_MENU_ITEM
- See Also:
-
-
Constructor Details
-
NestingCommonModelElementsInStereotypeApplications
public NestingCommonModelElementsInStereotypeApplications()Default Constructor
-
-
Method Details
-
contributeToMenu
This adds to the context menu a menu and the sub-menus for object creation items. -
selectionChanged
This implementsISelectionChangedListener
, handlingSelectionChangedEvent
s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly.- Specified by:
selectionChanged
in interfaceISelectionChangedListener
-
populateManager
public void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) This populates the specifiedmanager
withActionContributionItem
s based on theIAction
s contained in theactions
collection, by inserting them before the specified contribution itemcontributionID
. IfcontributionID
isnull
, they are simply added. -
depopulateManager
This removes from the specifiedmanager
allActionContributionItem
s based on theIAction
s contained in theactions
collection.
-