Package org.eclipse.gef.ui.actions
Class ActionRegistry
java.lang.Object
org.eclipse.gef.ui.actions.ActionRegistry
A container for editor actions. You must register the actions before they
will be available to the editor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Calls dispose on all actions which implement theDisposable
interface so they can perform their own clean-up.Returnsnull
or theIAction
with the given key.Returns anIterator
over all the actions.void
registerAction
(IAction action) Register an action with this registry.void
removeAction
(IAction action) Removes an action from this registry.
-
Constructor Details
-
ActionRegistry
public ActionRegistry()
-
-
Method Details
-
dispose
public void dispose()Calls dispose on all actions which implement theDisposable
interface so they can perform their own clean-up. -
getAction
Returnsnull
or theIAction
with the given key.- Parameters:
key
- the ID of the action being requested- Returns:
null
or the action with the corresponding ID
-
getActions
Returns anIterator
over all the actions.- Returns:
- an iterator over all actions
-
registerAction
Register an action with this registry. The action must have an ID.- Parameters:
action
- the action being registered.
-
removeAction
Removes an action from this registry. The action must have an ID.- Parameters:
action
- the action to remove
-