Class DiagramsActionsManager

java.lang.Object
com.nomagic.magicdraw.actions.DiagramsActionsManager

@OpenApiAll public class DiagramsActionsManager extends Object
The class responsible for managing the actions used in all kind of diagrams. All actions in this manager are grouped by diagram type.
  • Constructor Details

    • DiagramsActionsManager

      public DiagramsActionsManager()
  • Method Details

    • getManager

      @CheckForNull public ActionsManager getManager(String type)
      Returns the manager for the given diagram type.
      Returns:
      the manager for the given diagram type.
    • addManager

      public void addManager(String type, Supplier<ActionsManager> manager)
      Adds the given manager of the given diagram type.
      Parameters:
      type - the type of the diagram.
      manager - the given manager.
    • removeManager

      public void removeManager(String type)
      Removes the added manager of the given diagram type.
      Parameters:
      type - the type of the diagram.
    • getManagers

      public List<ActionsManager> getManagers()
      Returns the list of all managers.
      Returns:
      the list of all managers.
    • getActionFor

      @CheckForNull public NMAction getActionFor(KeyStroke stroke)
      Return the action for given stroke. It looks in all managers.
      Returns:
      the action for given stroke or null if there are no action with such stroke.