com.corticon.eclipse.core.util

## Class LimitedCommandStack

- java.lang.Object
- - org.eclipse.emf.common.command.BasicCommandStack
  - - com.corticon.eclipse.core.util.LimitedCommandStack

- All Implemented Interfaces:
    org.eclipse.emf.common.command.CommandStack

      public class LimitedCommandStack
      extends org.eclipse.emf.common.command.BasicCommandStack

  This is a specialized version of the EMF command stack that limits the number of elements retained on the stack according to a CcStudio property.

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.emf.common.command.BasicCommandStack

      `commandList, listeners, mostRecentCommand, saveIndex, top`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LimitedCommandStack()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(org.eclipse.emf.common.command.Command command)` Execute the current command, and truncate the stack if it exceeds the maximum stack size.

    - ### Methods inherited from class org.eclipse.emf.common.command.BasicCommandStack

      `addCommandStackListener, canRedo, canUndo, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, handleError, isSaveNeeded, notifyListeners, redo, removeCommandStackListener, saveIsDone, undo`

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

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

- - ### Constructor Detail

    - #### LimitedCommandStack

          public LimitedCommandStack()

  - ### Method Detail

    - #### execute

          public void execute(org.eclipse.emf.common.command.Command command)

      Execute the current command, and truncate the stack if it exceeds the maximum stack size.
      Specified by:
        `execute` in interface `org.eclipse.emf.common.command.CommandStack`
      Overrides:
        `execute` in class `org.eclipse.emf.common.command.BasicCommandStack`
      Parameters:
        `command` - Command to be executed.

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.