Class CommandContributionItem

java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ease.ui.scripts.keywordhandler.CommandContributionItem
All Implemented Interfaces:
IContributionItem
Direct Known Subclasses:
ScriptContributionItem

public class CommandContributionItem extends ContributionItem
A contribution item which delegates to a command. It can be used in AbstractContributionFactory.createContributionItems(IServiceLocator, IContributionRoot).

It currently supports placement in menus and toolbars.

This class may be instantiated; it is not intended to be subclassed.

Since:
3.3
  • Field Details

    • STYLE_PUSH

      public static final int STYLE_PUSH
      A push button tool item or menu item.
      See Also:
    • STYLE_CHECK

      public static final int STYLE_CHECK
      A checked tool item or menu item.
      See Also:
    • STYLE_RADIO

      public static final int STYLE_RADIO
      A radio-button style menu item.
      See Also:
    • STYLE_PULLDOWN

      public static final int STYLE_PULLDOWN
      A ToolBar pulldown item.
      See Also:
    • MODE_FORCE_TEXT

      public static int MODE_FORCE_TEXT
      Mode bit: Show text on tool items or buttons, even if an image is present. If this mode bit is not set, text is only shown on tool items if there is no image present.
      Since:
      3.4
  • Constructor Details

    • CommandContributionItem

      public CommandContributionItem(CommandContributionItemParameter contributionParameters)
      Create a CommandContributionItem to place in a ContributionManager.
      Parameters:
      contributionParameters - parameters necessary to render this contribution item.
      Since:
      3.4
    • CommandContributionItem

      @Deprecated public CommandContributionItem(IServiceLocator serviceLocator, String id, String commandId, Map parameters, ImageDescriptor icon, ImageDescriptor disabledIcon, ImageDescriptor hoverIcon, String label, String mnemonic, String tooltip, int style)
      Deprecated.
      Create a CommandContributionItem to place in a ContributionManager.
      Parameters:
      serviceLocator - a service locator that is most appropriate for this contribution. Typically the local IWorkbenchWindow or IWorkbenchPartSite will be sufficient.
      id - The id for this item. May be null. Items without an id cannot be referenced later.
      commandId - A command id for a defined command. Must not be null.
      parameters - A map of strings to strings which represent parameter names to values. The parameter names must match those in the command definition.
      icon - An icon for this item. May be null.
      disabledIcon - A disabled icon for this item. May be null.
      hoverIcon - A hover icon for this item. May be null.
      label - A label for this item. May be null.
      mnemonic - A mnemonic for this item to be applied to the label. May be null.
      tooltip - A tooltip for this item. May be null. Tooltips are currently only valid for toolbar contributions.
      style - The style of this menu contribution. See the STYLE_* constants.
  • Method Details