Default style (Cherry Eve). Switch styles (Capricorn). XML Feed Calendar
All | Games | General | Java | Music | NetBeans
20060814 Monday August 14, 2006

An update on scripting Jackpot

An update on scripting Jackpot

I've added scripting support for developing Transformers in Jackpot . The way you use it is similar to running Query. Open the 'Query and Refactor' (CTRL-Shift-Q), and select 'Transformer scripting runner'.

I have converted all the example scripts on the Jackpot website to Javascript so you can try these scripts, both query and transformer, on your projects. I've not really pushed the scripts so let me know if you find any errors. There are 2 scripts that are not working

  • find_unused_variables.js – I cannot seem to instantiate a Finder object.

  • beanize.js – I got exactly the same result as Beanize.java class. But for some strange reason, when I tried to view what source changes were made, Jackpot could not report the changes viz. the visual diff window did not open. I got the same result with the Java implementation. Also, while I was porting Beanize.java to Javascript, I found some missing methods like getMemberDecls() from Tree. Seems like Beanize.java is quite dated. Anyway if you manage to get this working let me know.

Here are the list of modules you will need if you are interested in trying this:

  • Script engine – here. I've fix some bugs. The continuation character '\' is now working in the script console. You can get the source here. The sources includes the window module.

  • Jackpot script engine – here. Source here.

  • Examples of Jackpot scripts – here. Unzip this. The scripts are under scripts/jackpot

See my earlier blog for more info. I will probably stop doing script related module for awhile. On to my next project....

Aug 14 2006, 03:32:03 PM SGT Permalink