Jackpot just open-sourced? But I thought it already had...

After months of slogging through Sun's Open Source Review process, last night I committed Jackpot's source to the NetBeans public CVS repository. If you want to browse it, follow the directions in the NetBeans CVS Access page, specifying "jackpot" as the module to check out.

You may be in for some disappointment if you do this, however, as all these source files provide is IDE integration for Jackpot, its UI, and rule file editor support. Where's the beef? Where is the code that does pattern matching on compiler ASTs and transforms them? Where is the source rewriter? WHY IS SUN YANKING MY CHAIN AGAIN!!! (I really get email like this occasionally.)

Now take a deep breath and relax. The truth is that Jackpot started life as a research project prototype which found some useful conclusions, including:

javac can be a great Java model generator for other Java tools;

a re-entrant javac turned out to be really fast when run as a background task; and

you can do some really gnarly-yet-safe editing with it.

So the Jackpot project passed much of its source to the javac team to make it re-entrant and its model useful for other tools for Java 5.0 (mostly James Gosling's work), and worked with the javac and NetBeans editor teams to help define the Compiler API released in Java 6. In a very real sense, you were using some parts of Jackpot when compiling with Java 5, and the associated source code is in the javac code recently made public.

The Jackpot piece most interesting to compiler junkies was released a few months ago. The new Java editor, which is coming in NetBeans 6.0, is based on the Compiler API and the transformation engine from Jackpot. That engine was quietly included as part of the new editor's release to open-source last October:

To browse the engine's source (and the Java editor enhancements), check out the "java/source" project using the CVS instructions above.

Yesterday the remaining parts of Jackpot were released to open-source, the ones no other project needed to publish first. The project is now a lot smaller than when we first transferred to the Developer Products Group (aka Tools), but its integration into the javac and NetBeans Java editor source bases will ensure its wider use throughout the Java community.