			JastAdd Refactoring Tools (JRRT)

The JastAdd Refactoring Tools are part of the JastAdd project
(http://www.jastadd.org). The newest version of these tools will
always be available from http://code.google.com/p/jrrt/.

The source code of JRRT is covered by the Eclipse Public License
Version 1.0, which is distributed together with this software (in file
EPL.html), and is available online at
http://www.eclipse.org/legal/epl-v10.html.

Overview:
=========
This is the command-line version of the refactoring engine for
JastAddJ.  It comes with a number of test and driver programs, but it
should not be thought of as an end-user tool. Most refactorings from
recent versions of Eclipse are implemented.

Building:
=========
JRRT depends on the JastAddJ compiler, specifically the
Java1.4Frontend and Java1.5Frontend components; see
http://jastadd.org/web/jastaddj/ for information on how to obtain 
them. 

It also depends on parts of the JastAddJ control flow package, which
is available from svn under

  http://svn.cs.lth.se/svn/jastadd-oxford/projects/trunk/JastAddExtensions/ControlFlowGraph

Make sure that projects ControlFlowGraph, Java1.4Frontend and
Java1.5Frontend are unpacked into sibling directories of this one,
then do `ant clean' to be on the safe side. The project is built using
ant with build file build.xml

The most commonly used ant goals in build.xml are:
gen        run JastAdd no generate node definitions and the scanner and
           parser; does not compile the resulting Java code
build      first runs gen, then compiles the resulting Java files
cleanGen   deletes all generated Java code and subdirectories

Implementation:
===============
The folder Naming/ contains the source code for the naming component
of JRRT, Flow/ implements flow dependencies. The folder Concurrency/
contains the implementation of synchronisation dependencies. 
The folder LanguageExtensions/ contains the implementations of various
language extensions and restrictions. The folder AccessibilityConstraints/
contains code for collecting and solving accessibility constraints,
TypeConstraints/ does the same for type constraints.

The folder tests/ contains several test suites and their data, on
which see below. Folder util/ contains utility code. Folder doc/
contains specifications of the refactorings, collected in file
specifications.tex (this is work in progress).

All other folders contain implementations of individual refactorings.

Testing:
========
The package tests contains several test cases comprising our own
internal test suite. The package tests.eclipse and its subpackages
contain a copy of the relevant bits of the most recent (as of March
2010) version of Eclipse's own test suite, modified so that it can be
run under our implementation.

In some cases, result files had to be edited lightly; we have
commented out the original version of the code using '///'.

In order to run the tests, it is probably easiest to import
Refactoring/ as an Eclipse project (it is already set up as one). See
instructions on the JastAdd homepage on how to compile JastAdd
projects within Eclipse.

The complete set of tests can then be run through the test suite
tests.AllTests. Note that we have disabled all tests on which our
results are not the same as Eclipse's, with detailed comments in the
individual test suites explaining why the results are different.

If you only want to run the Eclipse test cases (without our own
internal tests), use tests.eclipse.EclipseTests instead.

If you have junit.jar on your classpath, you can also run the test
cases from the command line by issuing a command like

  java -classpath .:lib/junit.jar:lib/cream106.jar -Xmx2G junit.awtui.TestRunner tests.AllTests

from the Refactoring/ directory.