org.eclipse.emf.ecoretools.tabbedproperties
Class EMFRecordingChangeCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.ecoretools.tabbedproperties.EMFRecordingChangeCommand
All Implemented Interfaces:
org.eclipse.emf.common.command.Command

public abstract class EMFRecordingChangeCommand
extends org.eclipse.emf.common.command.AbstractCommand

An automatic command


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 inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
EMFRecordingChangeCommand(org.eclipse.emf.ecore.resource.Resource resource)
          Constructor
 
Method Summary
 boolean canUndo()
          I can undo if I have recorded any changes previously.
 void dispose()
           
protected abstract  void doExecute()
          TODO comment this method
 void execute()
          I run the runnable when I execute the first time.
protected  boolean prepare()
          I am ready to execute if I haven't recorded any changes, yet.
 void redo()
          Redoes by applying changes recorded in the last undo.
 void undo()
          Undoes by applying recorded changes.
 
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
 

Constructor Detail

EMFRecordingChangeCommand

public EMFRecordingChangeCommand(org.eclipse.emf.ecore.resource.Resource resource)
Constructor

Parameters:
resource -
Method Detail

execute

public void execute()
I run the runnable when I execute the first time.


prepare

protected boolean prepare()
I am ready to execute if I haven't recorded any changes, yet.

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

doExecute

protected abstract void doExecute()
TODO comment this method


canUndo

public boolean canUndo()
I can undo if I have recorded any changes previously.

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

undo

public void undo()
Undoes by applying recorded changes.

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

redo

public void redo()
Redoes by applying changes recorded in the last undo.


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
See Also:
AbstractCommand.dispose()

Copyright 2007 Anyware Technologies.
All Rights Reserved.