Tungsten using Eclipse

Download eclipse 3.1
After you've downloaded it, unzip it wherever you'd like to install it; there's no actual installation program. The first time eclipse runs, it will ask you which workspace to use; I'd recommend you use one somewhere in your home directory, in the sort of place you'd usually keep the files for a project.
 * Direct windows download link
 * Downloads page

Install subclipse
Start eclipse, go to Help|Software Updates|Find and Install. Select 'Search for new features to install', click 'New Remote Site', and enter the URL 'http://subclipse.tigris.org/update'. The rest should be obvious.

Tell subclipse about the omath repository
In eclipse, go to Window|Open Perspective|Other, and select 'SVN Repository Exploring'. Right click in the 'SVN Repository' view, and slect New|Repository Location. Enter the URL of your repository; for Tungsten, this is http://omath.org/svn/omath You can leave Root URL blank, at least for now.

You should probably enter your username and password as well. (If you have one, ask me.

Check out the Tungsten source tree as a java project
Under the newly added repository, find the folder /trunk/kernel. Right click on this, and select 'Check Out As...', then select Java project. Type in the project name (probably 'tungsten-kernel', or similar), then go to the section 'JDK compliance', and select '5.0'. Now click 'Finish'. If you get a dialog titled 'Confirm Overwrite', just click okay.

You should be able to run either the applet or the command line program from within Eclipse; right-click on either TungstenApplet.java or Tungsten.java in the .ui package, and select 'Run As'.

If you make changes (please do!) you can check them back in by right clicking on the project folder (or a subfolder), selecting 'Team' then 'Commit'. All the other SVN commands are listed under 'Team'. You might want to look at Getting started hacking Tungsten.

troubleshooting
You may need to right-click on the top folder of the project, select 'Build Path', and tell eclipse that the source files live in the folder 'java-source'. (While you're at it, tell it to put output files in 'classes'; this will make building the jar easier if you need to do that later.)

Edit your local.properties file
There are a few times we can't avoid making references to the local file system. These are all wrapped up in your local.properties file. Go the the /ant directory, copy local.properties.template ---> local.properties then make the appropriate changes in the local.properties file. Hopefully it should just be a matter of choosing either the windows or unix looking lines, and changing the paths to match your setup.

Make .nb file assocations in Eclipse (optional)
If you have Mathematica, you may want to tell Eclipse to load .nb file in Mathematica (there are a few Mathematica notebooks included in Tungsten's repository). Under Preferences, go to Editors, File Associations. It's obvious from here.

Tell Eclipse to use java source level 5.0 (required, but maybe you did it above)
If you didn't specify the java source level when you checked out the project via SVN, you'll have to do that now.

Go to Project|Properties|Java Compiler. Click 'Enable project specific settings', and set 'Compiler compliance level' to 5.0

Opening an 'Ant' view
In order to use our automated build scripts. You'll need to open the 'Ant' view. Go to Window|Show View|Ant. You can move this resulting view to a convenient location; probably overlapping with whatever you've already got on the left hand edge of the screen.

Once you have the view positioned, click on the little grey plus sign at the top of the view. Select ant/build.xml. The interesting tasks are build-sessions, which runs mathematica over all the test sessions, and distribution.

Working on the parser project
If you're interested in working on the parser, you'll need to check out the parser project separately. Instead of checking out '/trunk/kernel', check out '/trunk/parser', but otherwise follow the instructions above.

The parser is a complicated beast - in fact too complicated to write by hand. We using javacc (the java compiler compiler) to build the parser out of a languange definition file. Worse, we generate the language definition file itself using a python script!

Thus to work on the parser, you'll need a working install of Python, and javacc. See Hacking the parser for instructions on setting these up.