|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.action.ActionManager
Responsible for managing the running of actions. All actions (delegates and handlers) channel their run requests through an action manager. An action manager keeps track of the action that was last run and fires events to interested listeners whenever an action is run.
| Field Summary | |
protected static java.lang.String |
EMPTY_STRING
The empty string. |
protected static java.lang.String |
SPACE
A string containing only a space character. |
| Constructor Summary | |
ActionManager(IOperationHistory operationHistory)
Intializes me with an operation history. |
|
| Method Summary | |
void |
addActionManagerChangeListener(IActionManagerChangeListener listener)
Adds the specified listener to the list of action manager change listeners for this action manager. |
void |
clear()
Clears this action manager by discarding the last action that was run. |
protected void |
fireActionManagerChange(ActionManagerChangeEvent event)
Notifies the listeners for this action manager that the specified event has occurred. |
protected IActionWithProgress |
getAction()
Retrieves the value of the action instance variable. |
static ActionManager |
getDefault()
Retrieves the default action manager. |
protected java.util.List |
getListeners()
Retrieves the value of the listeners instance variable. |
IOperationHistory |
getOperationHistory()
Gets my operation history. |
void |
removeActionManagerChangeListener(IActionManagerChangeListener listener)
Removes the specified listener from the list of action manager change listeners for this action manager. |
void |
run(IActionWithProgress theAction)
Runs the specified action. |
protected void |
setAction(IActionWithProgress action)
Sets the action instance variable to the specified value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String EMPTY_STRING
protected static final java.lang.String SPACE
| Constructor Detail |
public ActionManager(IOperationHistory operationHistory)
operationHistory - The operation history for this action manager.| Method Detail |
public static ActionManager getDefault()
public final IOperationHistory getOperationHistory()
protected final IActionWithProgress getAction()
action instance variable.
action instance variable.protected final void setAction(IActionWithProgress action)
action instance variable to the specified value.
action - The new value for the action instance
variable.protected final java.util.List getListeners()
listeners instance variable.
listeners instance varible.public void addActionManagerChangeListener(IActionManagerChangeListener listener)
listener - The listener to be added.public void removeActionManagerChangeListener(IActionManagerChangeListener listener)
listener - The listener to be removed.protected void fireActionManagerChange(ActionManagerChangeEvent event)
event - The action manager change event to be fired.public void clear()
public void run(IActionWithProgress theAction)
theAction - The action to be run.
java.lang.UnsupportedOperationException - If the action cannot be run.
java.lang.RuntimeException - if any exception or error occurs
while running the action
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.