Modelers

org.topcased.modeler.editor.outline
Class DefaultCreateChildMenu

java.lang.Object
  extended by org.eclipse.jface.action.ContributionManager
      extended by org.eclipse.jface.action.MenuManager
          extended by org.topcased.modeler.editor.outline.DefaultCreateChildMenu
All Implemented Interfaces:
org.eclipse.jface.action.IContributionItem, org.eclipse.jface.action.IContributionManager, org.eclipse.jface.action.IMenuManager, ICreateChildMenu

public class DefaultCreateChildMenu
extends org.eclipse.jface.action.MenuManager
implements ICreateChildMenu

A default 'Create child' menu.
Creation : 24 nov. 2005


Field Summary
 
Fields inherited from class org.eclipse.jface.action.MenuManager
visible
 
Constructor Summary
DefaultCreateChildMenu()
          Constructor.
 
Method Summary
 void createMenuContents()
          Creates the actions and puts it in the context menu
protected  java.util.Collection generateCreateChildActions(MixedEditDomain domain, java.util.Collection descriptors, EObject selection)
          This generates a CreateChildAction for each object in descriptors, and returns the collection of these actions.
protected  void populateManager(org.eclipse.jface.action.IContributionManager manager, java.util.Collection actions, java.lang.String contributionID)
          This populates the specified manager with ActionContributionItems based on the IActions contained in the actions collection, by inserting them before the specified contribution item contributionID.
 void setMixedEditDomain(MixedEditDomain domain)
          Set the EditDomain to use in the actions
 void setSelectedEObject(EObject object)
          Set the current selected objects
 
Methods inherited from class org.eclipse.jface.action.MenuManager
addMenuListener, createContextMenu, createMenuBar, createMenuBar, dispose, fill, fill, fill, fill, findMenuUsingPath, findUsingPath, getId, getMenu, getMenuText, getOverrides, getParent, getRemoveAllWhenShown, isDynamic, isEnabled, isGroupMarker, isSeparator, isSubstituteFor, isVisible, markDirty, removeMenuListener, saveWidgetState, setOverrides, setParent, setRemoveAllWhenShown, setVisible, update, update, update, update, updateAll
 
Methods inherited from class org.eclipse.jface.action.ContributionManager
add, add, allowItem, appendToGroup, appendToGroup, dumpStatistics, find, getItems, getSize, hasDynamicItems, indexOf, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, internalSetItems, isDirty, isEmpty, itemAdded, itemRemoved, prependToGroup, prependToGroup, remove, remove, removeAll, replaceItem, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IMenuManager
addMenuListener, findMenuUsingPath, findUsingPath, getRemoveAllWhenShown, isEnabled, removeMenuListener, setRemoveAllWhenShown, updateAll
 
Methods inherited from interface org.eclipse.jface.action.IContributionManager
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, update
 
Methods inherited from interface org.eclipse.jface.action.IContributionItem
dispose, fill, fill, fill, fill, getId, isDirty, isDynamic, isGroupMarker, isSeparator, isVisible, saveWidgetState, setParent, setVisible, update, update
 

Constructor Detail

DefaultCreateChildMenu

public DefaultCreateChildMenu()
Constructor.

Method Detail

setMixedEditDomain

public void setMixedEditDomain(MixedEditDomain domain)
Description copied from interface: ICreateChildMenu
Set the EditDomain to use in the actions

Specified by:
setMixedEditDomain in interface ICreateChildMenu
Parameters:
domain - the edit domain
See Also:
ICreateChildMenu.setMixedEditDomain(org.topcased.modeler.editor.MixedEditDomain)

setSelectedEObject

public void setSelectedEObject(EObject object)
Description copied from interface: ICreateChildMenu
Set the current selected objects

Specified by:
setSelectedEObject in interface ICreateChildMenu
Parameters:
object - the current EObject
See Also:
ICreateChildMenu.setSelectedEObject(org.eclipse.emf.ecore.EObject)

createMenuContents

public void createMenuContents()
Description copied from interface: ICreateChildMenu
Creates the actions and puts it in the context menu

Specified by:
createMenuContents in interface ICreateChildMenu
See Also:
ICreateChildMenu.createMenuContents()

populateManager

protected void populateManager(org.eclipse.jface.action.IContributionManager manager,
                               java.util.Collection actions,
                               java.lang.String contributionID)
This populates the specified manager with ActionContributionItems based on the IActions contained in the actions collection, by inserting them before the specified contribution item contributionID. If ID is null, they are simply added.

Parameters:
manager - the menu to fill
actions - the actions to add
contributionID - the position of the contribution

generateCreateChildActions

protected java.util.Collection generateCreateChildActions(MixedEditDomain domain,
                                                          java.util.Collection descriptors,
                                                          EObject selection)
This generates a CreateChildAction for each object in descriptors, and returns the collection of these actions.

Parameters:
domain - The modeler domain
descriptors - the child descriptors
selection - the selected object
Returns:
a collection of actions

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.