Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.undo
Interface IdeUndoManager

public interface IdeUndoManager

Class `IdeUndoManager` allows to track the changes in the model and to discard almost any change.

A "change in model" means modification of the model structure or in any of its elements.

The current state of the model can be obtained using the `markState` method. Having obtained the state of the model, one can return to that state using the `resetChange` method.

Author:
  TogetherSoft

Method Summary
`boolean` | `canResetState(Object state)` Checks whether is is possible to reset the current state of the model and to set it to the specified state.
`Object` | `markState()` Returns an `Object` that stores the current state of the model.
`void` | `resetState(Object state)` Resets the current state of the model and sets it to the specified state, obtained at some earlier moment by `markState` method.
`boolean` | `wasEssentialChange(Object state)` Checks if any significant changes in the model occurred since the specified state.

Method Detail

### canResetState

    public boolean canResetState(Object state)

  Checks whether is is possible to reset the current state of the model and to set it to the specified state. If such reset is possible, returns `true`. Otherwise returns `false`, for example, if the project has been closed.
  Parameters:
    state - `Object` that stores the required state of the model
  Returns: `true` if the model can be reset to the specified state, `false` otherwise.

### markState

    public Object markState()

  Returns an `Object` that stores the current state of the model.
  Returns: `Object` with the current model state
  See Also:
    resetState(java.lang.Object)

### resetState

    public void resetState(Object state)

  Resets the current state of the model and sets it to the specified state, obtained at some earlier moment by `markState` method.
  Parameters:
    state - `Object` that stores the previous model state
  See Also:
    canResetState(java.lang.Object)

### wasEssentialChange

    public boolean wasEssentialChange(Object state)

  Checks if any significant changes in the model occurred since the specified state. A "significant" change is a change in the structure of the model or any of its elements, but not a change in the selection, zoom factor etc.
  Parameters:
    state - `Object` that stores the reference state
  Returns: `true` if the model has undergone essential modification since the specified state; `false` otherwise

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD