Package org.eclipse.gef.ui.actions
Class ActionBarContributor
java.lang.Object
org.eclipse.ui.part.EditorActionBarContributor
org.eclipse.gef.ui.actions.ActionBarContributor
- All Implemented Interfaces:
- IEditorActionBarContributor
Contributes actions to the workbench. !!Warning: This class is subject to
 change.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidAdds the given action to the action registry.protected voidaddGlobalActionKey(String key) Indicates the existence of a global action identified by the specified key.protected voidaddRetargetAction(RetargetAction action) Adds the specified RetargetAction to this contributorsActionRegistry.protected abstract voidCreates and initializes Actions managed by this contributor.protected abstract voidSubclasses must implement to declare additional global actions IDs.voiddispose()Disposes the contributor.protected IActionRetrieves an action from the action registry using the given ID.protected ActionRegistryreturns this contributor's ActionRegsitry.voidinit(IActionBars bars) voidsetActiveEditor(IEditorPart editor) Methods inherited from class org.eclipse.ui.part.EditorActionBarContributorcontributeToCoolBar, contributeToMenu, contributeToStatusLine, contributeToToolBar, getActionBars, getPage, init
- 
Constructor Details- 
ActionBarContributorpublic ActionBarContributor()
 
- 
- 
Method Details- 
addActionAdds the given action to the action registry.- Parameters:
- action- the action to add
 
- 
addGlobalActionKeyIndicates the existence of a global action identified by the specified key. This global action is defined outside the scope of this contributor, such as the Workbench's undo action, or an action provided by a workbench ActionSet. The list of global action keys is used whenever the active editor is changed (setActiveEditor(IEditorPart)). Keys provided here will result in corresponding actions being obtained from the active editor'sActionRegistry, and those actions will be registered with the ActionBars for this contributor. The editor's action handler and the global action must have the same key.- Parameters:
- key- the key identifying the global action
 
- 
addRetargetActionAdds the specified RetargetAction to this contributorsActionRegistry. The RetargetAction is also added as aIPartListenerof the contributor's page. Also, the retarget action's ID is flagged as a global action key, by callingaddGlobalActionKey(String).- Parameters:
- action- the retarget action being added
 
- 
buildActionsprotected abstract void buildActions()Creates and initializes Actions managed by this contributor.
- 
declareGlobalActionKeysprotected abstract void declareGlobalActionKeys()Subclasses must implement to declare additional global actions IDs. Only IDs which were not already added directly or indirectly usingaddGlobalActionKey(String)need to be added.- See Also:
 
- 
disposepublic void dispose()Disposes the contributor. Removes allRetargetActions that wereIPartListeners on theIWorkbenchPageand disposes them. Also disposes the action registry.Subclasses may extend this method to perform additional cleanup. - Specified by:
- disposein interface- IEditorActionBarContributor
- Overrides:
- disposein class- EditorActionBarContributor
- See Also:
 
- 
getActionRetrieves an action from the action registry using the given ID.- Parameters:
- id- the ID of the sought action
- Returns:
- nullor the action if found
 
- 
getActionRegistryreturns this contributor's ActionRegsitry.- Returns:
- the ActionRegistry
 
- 
init- Overrides:
- initin class- EditorActionBarContributor
- See Also:
 
- 
setActiveEditor- Specified by:
- setActiveEditorin interface- IEditorActionBarContributor
- Overrides:
- setActiveEditorin class- EditorActionBarContributor
- See Also:
 
 
-