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 of ICompareCopyCommand on each side.
  • 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

      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 since saveIsDone() 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 if CompareCommandStack.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 if CompareCommandStack.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.