org.acm.seguin.refactor.undo
Class DefaultUndoAction

java.lang.Object
  extended by org.acm.seguin.refactor.undo.DefaultUndoAction
All Implemented Interfaces:
java.io.Serializable, UndoAction

public class DefaultUndoAction
extends java.lang.Object
implements UndoAction, java.io.Serializable

Stores the undo operation. The undo operation consists of a description of the refactoring that was performed to create this UndoAction and a list of files that have changed.

The files that have changed are indexed files, in that they have an index appended to the name of the file.

Author:
Chris Seguin
See Also:
Serialized Form

Constructor Summary
DefaultUndoAction()
          Constructor for the UndoAction object
 
Method Summary
 void add(java.io.File oldFile, java.io.File newFile)
          Adds a file to this action
 java.lang.String getDescription()
          Gets the Description attribute of the UndoAction object
 void setDescription(java.lang.String description)
          Sets the Description attribute of the UndoAction object
 void undo()
          Undo the current action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUndoAction

public DefaultUndoAction()
Constructor for the UndoAction object

Method Detail

setDescription

public void setDescription(java.lang.String description)
Sets the Description attribute of the UndoAction object

Specified by:
setDescription in interface UndoAction
Parameters:
description - the description of the action

getDescription

public java.lang.String getDescription()
Gets the Description attribute of the UndoAction object

Specified by:
getDescription in interface UndoAction
Returns:
The Description value

add

public void add(java.io.File oldFile,
                java.io.File newFile)
Adds a file to this action

Specified by:
add in interface UndoAction
Parameters:
oldFile - the original file
newFile - the new file

undo

public void undo()
Undo the current action

Specified by:
undo in interface UndoAction