Class CompareCommandStack.CompareSideCommandStack
- java.lang.Object
-
- org.eclipse.emf.compare.command.impl.CompareCommandStack.CompareSideCommandStack
-
- Enclosing class:
- CompareCommandStack
public static class CompareCommandStack.CompareSideCommandStack extends Object
Simple data structure acting like a command stack but without any execution capability. It is used to record execution ofICompareCopyCommandon each side.
-
-
Constructor Summary
Constructors Constructor Description CompareSideCommandStack()Creates a new empty instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuted(ICompareCopyCommand command)Record the execution of the given command.voidexecutedWithException(ICompareCopyCommand command)Will be called if the execute method of the command did not end normally.voidflushed()Disposes all the commands in the stack.CommandgetMostRecentCommand()Returns the command most recently executed, undone, or redone.CommandgetRedoCommand()Returns the command that will be redone ifCompareCommandStack.redo()is called.CommandgetUndoCommand()Returns the command that will be undone ifCompareCommandStack.undo()is called.booleanisSaveNeeded()Returns whether the model has changes sincesaveIsDone()was call the last.voidredone()Record that the top of the command list has been redone.voidredoneWithException()Record that the redo method has raised exceptions.voidsaveIsDone()Called after a save has been successfully performed.voidundone()Record that the top of the command list has been undone.voidundoneWithException()Record that the undo method has raised exceptions.
-
-
-
Method Detail
-
redoneWithException
public void redoneWithException()
Record that the redo method has raised exceptions.
-
undoneWithException
public void undoneWithException()
Record that the undo method has raised exceptions.
-
executed
public void executed(ICompareCopyCommand command)
Record the execution of the given command.- Parameters:
command- the command to record.
-
executedWithException
public void executedWithException(ICompareCopyCommand command)
Will be called if the execute method of the command did not end normally.- Parameters:
command- the command that raised exceptions.
-
undone
public void undone()
Record that the top of the command list has been undone.
-
redone
public void redone()
Record that the top of the command list has been redone.
-
flushed
public void flushed()
Disposes all the commands in the stack.
-
saveIsDone
public void saveIsDone()
Called after a save has been successfully performed.
-
isSaveNeeded
public boolean isSaveNeeded()
Returns whether the model has changes sincesaveIsDone()was call the last.- Returns:
- whether the model has changes since
saveIsDonewas call the last.
-
getUndoCommand
public Command getUndoCommand()
Returns the command that will be undone ifCompareCommandStack.undo()is called.- Returns:
- the command that will be undone if
CompareCommandStack.undo()is called.
-
getRedoCommand
public Command getRedoCommand()
Returns the command that will be redone ifCompareCommandStack.redo()is called.- Returns:
- the command that will be redone if
CompareCommandStack.redo()is called.
-
getMostRecentCommand
public Command getMostRecentCommand()
Returns the command most recently executed, undone, or redone.- Returns:
- the command most recently executed, undone, or redone.
-
-