Class CompareCommandStack.CompareSideCommandStack
java.lang.Object
org.eclipse.emf.compare.command.impl.CompareCommandStack.CompareSideCommandStack
- Enclosing class:
- CompareCommandStack
Simple data structure acting like a command stack but without any execution capability. It is used to
record execution of
ICompareCopyCommand
on each side.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Returns the command most recently executed, undone, or redone.Returns the command that will be redone ifCompareCommandStack.redo()
is called.Returns the command that will be undone ifCompareCommandStack.undo()
is called.boolean
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
Record that the redo method has raised exceptions.void
Called after a save has been successfully performed.void
undone()
Record that the top of the command list has been undone.void
Record that the undo method has raised exceptions.
-
Constructor Details
-
CompareSideCommandStack
public CompareSideCommandStack()Creates a new empty instance.
-
-
Method Details
-
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
Record the execution of the given command.- Parameters:
command
- the command to record.
-
executedWithException
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
Returns the command that will be undone ifCompareCommandStack.undo()
is called.- Returns:
- the command that will be undone if
CompareCommandStack.undo()
is called.
-
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
Returns the command most recently executed, undone, or redone.- Returns:
- the command most recently executed, undone, or redone.
-