Class PluginActionContributionItem

All Implemented Interfaces:
IContributionItem, IActivityManagerListener, IIdentifierListener
Direct Known Subclasses:
PluginActionCoolBarContributionItem

public class PluginActionContributionItem extends ActionContributionItem implements IIdentifierListener, IActivityManagerListener
Contribution item for actions provided by plugins via workbench action extension points.
  • Constructor Details

    • PluginActionContributionItem

      public PluginActionContributionItem(PluginAction action)
      Creates a new contribution item from the given action. The id of the action is used as the id of the item.
      Parameters:
      action - the action
  • Method Details

    • setParent

      public void setParent(IContributionManager parent)
      Description copied from interface: IContributionItem
      Sets the parent manager of this item
      Specified by:
      setParent in interface IContributionItem
      Overrides:
      setParent in class ContributionItem
      Parameters:
      parent - the parent contribution manager
    • dispose

      public void dispose()
      The default implementation of this IContributionItem method notifies the delegate if loaded and implements the IActionDelegate2 interface.
      Specified by:
      dispose in interface IContributionItem
      Overrides:
      dispose in class ActionContributionItem
    • isVisible

      public boolean isVisible()
      Description copied from class: ActionContributionItem
      The ActionContributionItem implementation of this ContributionItem method extends the super implementation by also checking whether the command corresponding to this action is active.
      Specified by:
      isVisible in interface IContributionItem
      Overrides:
      isVisible in class ActionContributionItem
      Returns:
      true if this item is visible, and false otherwise
    • identifierChanged

      public void identifierChanged(IdentifierEvent identifierEvent)
      Description copied from interface: IIdentifierListener
      Notifies that one or more properties of an instance of IIdentifier have changed. Specific details are described in the IdentifierEvent.
      Specified by:
      identifierChanged in interface IIdentifierListener
      Parameters:
      identifierEvent - the identifier event. Guaranteed not to be null.
    • invalidateParent

      protected void invalidateParent()
      Mark the parent dirty if we have a parent.
      Since:
      3.1
    • activityManagerChanged

      public void activityManagerChanged(ActivityManagerEvent activityManagerEvent)
      Description copied from interface: IActivityManagerListener
      Notifies that one or more properties of an instance of IActivityManager have changed. Specific details are described in the ActivityManagerEvent.
      Specified by:
      activityManagerChanged in interface IActivityManagerListener
      Parameters:
      activityManagerEvent - the activity manager event. Guaranteed not to be null.
    • getSelection

      public ISelection getSelection()