|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.part.EditorActionBarContributor | +--org.eclipse.gef.ui.actions.ActionBarContributor
Contributes actions to the workbench. !!Warning: This class is subject to change.
Constructor Summary | |
ActionBarContributor()
|
Method Summary | |
protected void |
addAction(IAction action)
Adds the given action to the action registry. |
protected void |
addGlobalActionKey(String key)
Indicates the existence of a global action identified by the specified key. |
protected void |
addRetargetAction(RetargetAction action)
Adds the specified RetargetAction to this contributors ActionRegistry . |
protected abstract void |
buildActions()
Creates and initializes Actions managed by this contributor. |
protected abstract void |
declareGlobalActionKeys()
Subclasses must implement to declare the set of global action keys. |
void |
dispose()
Disposes the contributor. |
protected IAction |
getAction(String id)
Retrieves an action from the action registry using the given ID. |
protected ActionRegistry |
getActionRegistry()
returns this contributor's ActionRegsitry. |
void |
init(IActionBars bars)
|
void |
setActiveEditor(IEditorPart editor)
|
Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor |
contributeToMenu, contributeToStatusLine, contributeToToolBar, getActionBars, getPage, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ActionBarContributor()
Method Detail |
protected void addAction(IAction action)
action
- the action to addprotected void addGlobalActionKey(String key)
setActiveEditor(IEditorPart)
).
Keys provided here will result in corresponding actions being obtained from the active
editor's ActionRegistry
, 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.
key
- the key identifying the global actionprotected void addRetargetAction(RetargetAction action)
ActionRegistry
. The
RetargetAction is also added as a IPartListener
of the contributor's page.
Also, the retarget actions ID is flagged as a global action key, by calling addGlobalActionKey(String)
.
action
- the retarget action being addedprotected abstract void buildActions()
protected abstract void declareGlobalActionKeys()
addGlobalActionKey(String)
public void dispose()
RetargetAction
s that were IPartListener
s on the IWorkbenchPage
. Disposes
the action registry.
Subclasses may extend this method to perform additional cleanup.
dispose
in interface IEditorActionBarContributor
dispose
in class EditorActionBarContributor
EditorActionBarContributor.dispose()
protected IAction getAction(String id)
id
- the ID of the sought action
null
or the action if foundprotected ActionRegistry getActionRegistry()
public void init(IActionBars bars)
init
in class EditorActionBarContributor
EditorActionBarContributor.init(IActionBars)
public void setActiveEditor(IEditorPart editor)
setActiveEditor
in interface IEditorActionBarContributor
setActiveEditor
in class EditorActionBarContributor
IEditorActionBarContributor.setActiveEditor(IEditorPart)
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |