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 ofICompareCopyCommand
on 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 void
executed(ICompareCopyCommand command)
Record the execution of the given command.void
executedWithException(ICompareCopyCommand command)
Will be called if the execute method of the command did not end normally.void
flushed()
Disposes all the commands in the stack.Command
getMostRecentCommand()
Returns the command most recently executed, undone, or redone.Command
getRedoCommand()
Returns the command that will be redone ifCompareCommandStack.redo()
is called.Command
getUndoCommand()
Returns the command that will be undone ifCompareCommandStack.undo()
is called.boolean
isSaveNeeded()
Returns whether the model has changes sincesaveIsDone()
was call the last.void
redone()
Record that the top of the command list has been redone.void
redoneWithException()
Record that the redo method has raised exceptions.void
saveIsDone()
Called after a save has been successfully performed.void
undone()
Record that the top of the command list has been undone.void
undoneWithException()
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
saveIsDone
was 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.
-
-