|
GEF (MVC) 3.9.100.201405261516 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.EditorActionBarContributor
org.eclipse.gef.ui.actions.ActionBarContributor
public abstract class 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(java.lang.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 additional global actions IDs. |
void |
dispose()
Disposes the contributor. |
protected IAction |
getAction(java.lang.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 |
---|
contributeToCoolBar, 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(java.lang.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
action's 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)
need to be added.
addGlobalActionKey(String)
public void dispose()
RetargetAction
s that were
IPartListener
s on the
IWorkbenchPage
and disposes them. Also 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(java.lang.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)
|
GEF (MVC) 3.9.100.201405261516 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |