Package org.eclipse.ui.internal
Class PluginActionContributionItem
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.jface.action.ActionContributionItem
org.eclipse.ui.internal.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.
-
Field Summary
Fields inherited from class org.eclipse.jface.action.ActionContributionItem
MODE_FORCE_TEXT
-
Constructor Summary
ConstructorDescriptionCreates a new contribution item from the given action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activityManagerChanged
(ActivityManagerEvent activityManagerEvent) Notifies that one or more properties of an instance ofIActivityManager
have changed.void
dispose()
The default implementation of thisIContributionItem
method notifies the delegate if loaded and implements theIActionDelegate2
interface.void
identifierChanged
(IdentifierEvent identifierEvent) Notifies that one or more properties of an instance ofIIdentifier
have changed.protected void
Mark the parent dirty if we have a parent.boolean
TheActionContributionItem
implementation of thisContributionItem
method extends the super implementation by also checking whether the command corresponding to this action is active.void
setParent
(IContributionManager parent) Sets the parent manager of this itemMethods inherited from class org.eclipse.jface.action.ActionContributionItem
equals, fill, fill, fill, getAction, getMode, getUseColorIconsInToolbars, getWidget, hashCode, isDynamic, isEnabled, isEnabledAllowed, setMode, setUseColorIconsInToolbars, shortenText, update, update
Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, getId, getParent, isDirty, isGroupMarker, isSeparator, saveWidgetState, setId, setVisible, toString
-
Constructor Details
-
PluginActionContributionItem
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
Description copied from interface:IContributionItem
Sets the parent manager of this item- Specified by:
setParent
in interfaceIContributionItem
- Overrides:
setParent
in classContributionItem
- Parameters:
parent
- the parent contribution manager
-
dispose
public void dispose()The default implementation of thisIContributionItem
method notifies the delegate if loaded and implements theIActionDelegate2
interface.- Specified by:
dispose
in interfaceIContributionItem
- Overrides:
dispose
in classActionContributionItem
-
isVisible
public boolean isVisible()Description copied from class:ActionContributionItem
TheActionContributionItem
implementation of thisContributionItem
method extends the super implementation by also checking whether the command corresponding to this action is active.- Specified by:
isVisible
in interfaceIContributionItem
- Overrides:
isVisible
in classActionContributionItem
- Returns:
true
if this item is visible, andfalse
otherwise
-
identifierChanged
Description copied from interface:IIdentifierListener
Notifies that one or more properties of an instance ofIIdentifier
have changed. Specific details are described in theIdentifierEvent
.- Specified by:
identifierChanged
in interfaceIIdentifierListener
- Parameters:
identifierEvent
- the identifier event. Guaranteed not to benull
.
-
invalidateParent
protected void invalidateParent()Mark the parent dirty if we have a parent.- Since:
- 3.1
-
activityManagerChanged
Description copied from interface:IActivityManagerListener
Notifies that one or more properties of an instance ofIActivityManager
have changed. Specific details are described in theActivityManagerEvent
.- Specified by:
activityManagerChanged
in interfaceIActivityManagerListener
- Parameters:
activityManagerEvent
- the activity manager event. Guaranteed not to benull
.
-
getSelection
-