org.eclipse.emf.compare.command.impl

## 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 Summary

Constructors
Constructor and Description
`CompareSideCommandStack()` Creates a new empty instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`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 if `CompareCommandStack.redo()` is called.
`Command` `getUndoCommand()` Returns the command that will be undone if `CompareCommandStack.undo()` is called.
`boolean` `isSaveNeeded()` Returns whether the model has changes since `saveIsDone()` 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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CompareSideCommandStack

    public CompareSideCommandStack()

Creates a new empty instance.

### 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 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.