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.
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....
Posted by Jesse Glick on August 14, 2006 at 11:52 PM SGT #
Posted by chuk on August 15, 2006 at 08:41 AM SGT #
Posted by ATom on August 16, 2006 at 02:50 PM SGT #
Posted by Chuk on August 16, 2006 at 04:03 PM SGT #
Comments are closed for this entry.