Class PluginActionBuilder.BasicContribution

java.lang.Object
org.eclipse.ui.internal.PluginActionBuilder.BasicContribution
Enclosing class:
PluginActionBuilder

protected static class PluginActionBuilder.BasicContribution extends Object
Helper class to collect the menus and actions defined within a contribution element.
  • Field Details

  • Constructor Details

    • BasicContribution

      protected BasicContribution()
  • Method Details

    • addMenu

      public void addMenu(IConfigurationElement element)
      Add a menu.
      Parameters:
      element - the element to base the menu on
    • addAction

      public void addAction(ActionDescriptor desc)
      Add an action.
      Parameters:
      desc - the descriptor
    • contribute

      public void contribute(IMenuManager menu, boolean menuAppendIfMissing, IToolBarManager toolbar, boolean toolAppendIfMissing)
      Contributes submenus and/or actions into the provided menu and tool bar managers. The elements added are filtered based on activity enablement.
      Parameters:
      menu - the menu to contribute to
      menuAppendIfMissing - whether to append missing groups to menus
      toolbar - the toolbar to contribute to
      toolAppendIfMissing - whether to append missing groups to toolbars
    • contributeMenu

      protected void contributeMenu(IConfigurationElement menuElement, IMenuManager mng, boolean appendIfMissing)
      Creates a menu from the information in the menu configuration element and adds it into the provided menu manager. If 'appendIfMissing' is true, and menu path slot is not found, it will be created and menu will be added into it. Otherwise, add operation will fail.
    • contributeMenuAction

      protected void contributeMenuAction(ActionDescriptor ad, IMenuManager menu, boolean appendIfMissing)
      Contributes action from action descriptor into the provided menu manager.
    • contributeSeparator

      protected void contributeSeparator(IMenuManager menu, IConfigurationElement element)
      Creates a named menu separator from the information in the configuration element. If the separator already exists do not create a second.
    • contributeGroupMarker

      protected void contributeGroupMarker(IMenuManager menu, IConfigurationElement element)
      Creates a named menu group marker from the information in the configuration element. If the marker already exists do not create a second.
    • contributeToolbarAction

      protected void contributeToolbarAction(ActionDescriptor ad, IToolBarManager toolbar, boolean appendIfMissing)
      Contributes action from the action descriptor into the provided tool bar manager.
    • insertMenuGroup

      protected void insertMenuGroup(IMenuManager menu, AbstractGroupMarker marker)
      Inserts the separator or group marker into the menu. Subclasses may override.
    • insertAfter

      protected void insertAfter(IContributionManager mgr, String refId, ActionDescriptor desc)
      Inserts an action after another named contribution item. Subclasses may override.
    • insertAfter

      protected void insertAfter(IContributionManager mgr, String refId, IContributionItem item)
      Inserts a contribution item after another named contribution item. Subclasses may override.
    • addGroup

      protected void addGroup(IContributionManager mgr, String name)
      Adds a group to a contribution manager. Subclasses may override.
    • dispose

      public void dispose()
      Disposes this contribution.
      Since:
      3.1
    • disposeActions

      protected void disposeActions()
      Disposes the actions.
      Since:
      3.1