How to compile .xact files(If you don't use the special Xact syntax for XML templates, you can skip this step and just use an ordinary Java compiler.)
Run the command below to convert all .xact files found in the src folder and subfolders to .java files. The Java files will be put in the generated folder.
java -cp xact-all.jar dk.brics.xact.compiler.Main -dir=src -out=generatedSpecific files can be converted like this:
java -cp xact-all.jar dk.brics.xact.compiler.Main src/Foo.xact src/Bar.xactNext, compile the generated .java files with an ordinary Java compiler.
How to analyze an Xact projectRun the command below to analyze all classes in the bin folder. The classpath used to run the analysis must contain the analyzed classes as well as the classes used by them. For example:
java -cp xact-all.jar:bin dk.brics.xact.analysis.Main -dir=bin
Example Eclipse project
- Open the project in Eclipse
- Open the Ant view
- Add build.xml to the Ant view
- Run the xact-to-java target
- Refresh the generated folder (select it and press F5)
- Run the analyze target
Note that the line numbers in the output refer to the generated .java files located in the generated folder, which (unfortunately) do not match the line numbers in the corresponding .xact file.