com.corticon.eclipse.core.util

## Class CompletedChangeCommand

- java.lang.Object
- - org.eclipse.emf.common.command.AbstractCommand
  - - com.corticon.eclipse.core.util.CompletedChangeCommand

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

      public class CompletedChangeCommand
      extends org.eclipse.emf.common.command.AbstractCommand

  CompletedChangeCommand is a type of command that is used with the ChangeRecorder. When the ChangeRecorder is used, EMF state changes are done directly as opposed to being deferred to the command stack. When a set of recorded changes is completed an instance of this object is added to the stack exclusively for undo/redo. Thus, the execute command for this class is non-operational, since the changes have already been accomplished.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand

      `org.eclipse.emf.common.command.AbstractCommand.NonDirtying`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.eclipse.emf.ecore.change.ChangeDescription` | `iChangeDescription`
    `protected org.eclipse.emf.ecore.resource.Resource` | `iResourcePrimary`

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

      `description, isExecutable, isPrepared, label`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompletedChangeCommand(org.eclipse.emf.ecore.change.ChangeDescription aChangeDescription, org.eclipse.emf.ecore.resource.Resource aResourcePrimary)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canUndo()`
    `void` | `dispose()`
    `void` | `execute()`
    `org.eclipse.emf.ecore.change.ChangeDescription` | `getChangeDescription()`
    `org.eclipse.emf.ecore.resource.Resource` | `getPrimaryResource()`
    `protected boolean` | `prepare()`
    `void` | `redo()`
    `void` | `setChangeDescription(org.eclipse.emf.ecore.change.ChangeDescription aChangeDescription)`
    `void` | `setPrimaryResource(org.eclipse.emf.ecore.resource.Resource aResourcePrimary)`
    `void` | `undo()`

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

      `canExecute, chain, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString`

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

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

- - ### Field Detail

    - #### iChangeDescription

          protected org.eclipse.emf.ecore.change.ChangeDescription iChangeDescription

    - #### iResourcePrimary

          protected org.eclipse.emf.ecore.resource.Resource iResourcePrimary

  - ### Constructor Detail

    - #### CompletedChangeCommand

          public CompletedChangeCommand(org.eclipse.emf.ecore.change.ChangeDescription aChangeDescription,
                                org.eclipse.emf.ecore.resource.Resource aResourcePrimary)

  - ### Method Detail

    - #### canUndo

          public boolean canUndo()

      Specified by:
        `canUndo` in interface `org.eclipse.emf.common.command.Command`
      Overrides:
        `canUndo` in class `org.eclipse.emf.common.command.AbstractCommand`

    - #### dispose

          public void dispose()

      Specified by:
        `dispose` in interface `org.eclipse.emf.common.command.Command`
      Overrides:
        `dispose` in class `org.eclipse.emf.common.command.AbstractCommand`

    - #### execute

          public void execute()

    - #### getChangeDescription

          public org.eclipse.emf.ecore.change.ChangeDescription getChangeDescription()

    - #### getPrimaryResource

          public org.eclipse.emf.ecore.resource.Resource getPrimaryResource()

    - #### prepare

          protected boolean prepare()

      Overrides:
        `prepare` in class `org.eclipse.emf.common.command.AbstractCommand`

    - #### redo

          public void redo()

    - #### setChangeDescription

          public void setChangeDescription(org.eclipse.emf.ecore.change.ChangeDescription aChangeDescription)

    - #### setPrimaryResource

          public void setPrimaryResource(org.eclipse.emf.ecore.resource.Resource aResourcePrimary)

    - #### undo

          public void undo()

      Specified by:
        `undo` in interface `org.eclipse.emf.common.command.Command`
      Overrides:
        `undo` in class `org.eclipse.emf.common.command.AbstractCommand`

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