|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.commands.CommandStack
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack
GEF command stack that delegates to an IOperationHistory.
| Field Summary |
| Fields inherited from class org.eclipse.gef.commands.CommandStack |
listeners, POST_EXECUTE, POST_REDO, POST_UNDO, PRE_EXECUTE, PRE_REDO, PRE_UNDO |
| Constructor Summary | |
DiagramCommandStack(IDiagramEditDomain editDomain)
Initializes me with my diagram edit domain and undo context. |
|
| Method Summary | |
void |
addCommandStackListener(CommandStackListener listener)
Adds a listener to this CommandStack. |
boolean |
canRedo()
Returns true if there is a Command to redo. |
boolean |
canUndo()
Returns true if the last Command executed can be undone. |
void |
dispose()
|
void |
execute(Command command)
Executes the given Command if it can execute. |
void |
execute(Command command,
IProgressMonitor progressMonitor)
Executes the given Command if it can execute. |
protected void |
execute(ICommand command)
exectus a the supplied command |
protected void |
execute(ICommand command,
IProgressMonitor progressMonitor)
executes the supplied command |
protected IDiagramEditDomain |
getDiagramEditDomain()
Returns the editDomain. |
static ICommand |
getICommand(Command command)
Converts a GEF Command into a GMF ICommand |
static ICommand |
getICommand(ICommand command)
Removes redundancies from command by stripping out layers
of command wrappers used to accomodate the use of GEF commands on an
IOperationHistory and ICommands on the GEF
CommandStack. |
Command |
getMostRecentCommand()
Returns the most recently executed command. |
protected IOperationHistory |
getOperationHistory()
Gets my operation history delegate. |
Command |
getRedoCommand()
getRedoCommand Returns the command at the top of the redo stack. |
static java.util.Collection |
getReturnValues(Command c)
Gets the return values of the given executed command |
static java.util.Collection |
getReturnValues(CommandProxy cmd)
gets the return the values for the supplied command. |
static java.util.Collection |
getReturnValues(ICommand cmd)
gets the return the values for the supplied command. |
static java.util.Collection |
getReturnValues(ICommandProxy cmd)
gets the return the values for the supplied command. |
Command |
getUndoCommand()
getUndoCommand() Returns the next command to be undone. |
IUndoContext |
getUndoContext()
Gets my undo context. |
void |
redo()
Executes the last undone Command. |
void |
removeCommandStackListener(CommandStackListener listener)
Removes the given CommandStackListener. |
void |
setOperationHistory(IOperationHistory operationHistory)
Sets my operation history delegate. |
void |
setUndoContext(IUndoContext undoContext)
Sets my undo context. |
void |
undo()
Undoes the last executed Command. |
| Methods inherited from class org.eclipse.gef.commands.CommandStack |
addCommandStackEventListener, flush, getCommands, getUndoLimit, isDirty, markSaveLocation, notifyListeners, notifyListeners, removeCommandStackEventListener, setUndoLimit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DiagramCommandStack(IDiagramEditDomain editDomain)
editDomain - the editing domain assoicated with this stack| Method Detail |
public void addCommandStackListener(CommandStackListener listener)
listener - The Object listening to this CommandStack.public boolean canRedo()
true if there is a Command to redo.
true if there is a Command to redo.public boolean canUndo()
true if the last Command executed can be undone.
true if the last Command executed can be undone.public void execute(Command command)
command - The Command to execute.
public void execute(Command command,
IProgressMonitor progressMonitor)
command - The Command to execute.progressMonitor - protected void execute(ICommand command)
command - the command to execute
protected void execute(ICommand command,
IProgressMonitor progressMonitor)
command - the command to exectueprogressMonitor - public static ICommand getICommand(Command command)
Command into a GMF ICommand
command - the GEF command
public static ICommand getICommand(ICommand command)
command by stripping out layers
of command wrappers used to accomodate the use of GEF commands on an
IOperationHistory and ICommands on the GEF
CommandStack.
command - the command to be processed
public Command getMostRecentCommand()
public Command getRedoCommand()
CommandStack.getRedoCommand()public Command getUndoCommand()
CommandStack.getUndoCommand()public void redo()
public void removeCommandStackListener(CommandStackListener listener)
listener - The object to be removed from the list of listeners.public void undo()
protected IDiagramEditDomain getDiagramEditDomain()
protected IOperationHistory getOperationHistory()
public void setOperationHistory(IOperationHistory operationHistory)
operationHistory - my operation history delegatepublic static java.util.Collection getReturnValues(Command c)
c - The command
public static java.util.Collection getReturnValues(ICommandProxy cmd)
cmd - command to use
public static java.util.Collection getReturnValues(CommandProxy cmd)
cmd - command to use
public static java.util.Collection getReturnValues(ICommand cmd)
cmd - command to use
public IUndoContext getUndoContext()
public void setUndoContext(IUndoContext undoContext)
undoContext - my undo contextpublic void dispose()
|
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.