org.acm.seguin.ide.jedit
Class JEditComplexTransform

java.lang.Object
  extended by org.acm.seguin.ide.jedit.JEditComplexTransform
All Implemented Interfaces:
ComplexTransform

public class JEditComplexTransform
extends java.lang.Object
implements ComplexTransform

Base class for a program that reads in an abstract syntax tree, transforms the code, and rewrites the file to disk.

Since:
0.0.1
Version:
$Id: JEditComplexTransform.java,v 1.4 2003/10/30 15:24:22 mikeatkinson Exp $
Author:
Chris Seguin, Mike Atkinson

Constructor Summary
JEditComplexTransform()
          Constructor for the JEditComplexTransform object
 
Method Summary
 void add(TransformAST value)
          Adds a syntax tree transformation
 void apply(java.io.File inputFile, java.io.File outputFile)
          Given a file, applies a set of transformations to it
 void clear()
          Clears all the transforms
 void createFile(java.io.File file)
          Creates a new file
 boolean hasAnyChanges()
          Is it worth applying the transforms
 void removeFile(java.io.File file)
          Removes an old file
 void setUndoAction(UndoAction init)
          Sets the undoAction attribute of the JEditComplexTransform object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEditComplexTransform

public JEditComplexTransform()
Constructor for the JEditComplexTransform object

Method Detail

setUndoAction

public void setUndoAction(UndoAction init)
Sets the undoAction attribute of the JEditComplexTransform object

Specified by:
setUndoAction in interface ComplexTransform
Parameters:
init - The new undoAction value

add

public void add(TransformAST value)
Adds a syntax tree transformation

Specified by:
add in interface ComplexTransform
Parameters:
value - Description of Parameter

clear

public void clear()
Clears all the transforms

Specified by:
clear in interface ComplexTransform

hasAnyChanges

public boolean hasAnyChanges()
Is it worth applying the transforms

Specified by:
hasAnyChanges in interface ComplexTransform
Returns:
true if there is any

apply

public void apply(java.io.File inputFile,
                  java.io.File outputFile)
Given a file, applies a set of transformations to it

Specified by:
apply in interface ComplexTransform
Parameters:
inputFile - Description of Parameter
outputFile - Description of Parameter

createFile

public void createFile(java.io.File file)
Creates a new file

Specified by:
createFile in interface ComplexTransform
Parameters:
file - Description of Parameter

removeFile

public void removeFile(java.io.File file)
Removes an old file

Specified by:
removeFile in interface ComplexTransform
Parameters:
file - Description of Parameter