Package org.eclipse.gef.ui.actions
Class ActionRegistry
- java.lang.Object
-
- org.eclipse.gef.ui.actions.ActionRegistry
-
public class ActionRegistry extends java.lang.ObjectA container for editor actions. You must register the actions before they will be available to the editor.
-
-
Constructor Summary
Constructors Constructor Description ActionRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Calls dispose on all actions which implement theDisposableinterface so they can perform their own clean-up.IActiongetAction(java.lang.Object key)Returnsnullor theIActionwith the given key.java.util.IteratorgetActions()Returns anIteratorover all the actions.voidregisterAction(IAction action)Register an action with this registry.voidremoveAction(IAction action)Removes an action from this registry.
-
-
-
Method Detail
-
dispose
public void dispose()
Calls dispose on all actions which implement theDisposableinterface so they can perform their own clean-up.
-
getAction
public IAction getAction(java.lang.Object key)
Returnsnullor theIActionwith the given key.- Parameters:
key- the ID of the action being requested- Returns:
nullor the action with the corresponding ID
-
getActions
public java.util.Iterator getActions()
Returns anIteratorover all the actions.- Returns:
- an iterator over all actions
-
registerAction
public void registerAction(IAction action)
Register an action with this registry. The action must have an ID.- Parameters:
action- the action being registered.
-
removeAction
public void removeAction(IAction action)
Removes an action from this registry. The action must have an ID.- Parameters:
action- the action to remove
-
-