Wednesday, July 31, 2013

Introducing EScript - scripting for your IDE

During the last years I was playing around with a scripting engine supporting JavaScript that is directly integrated in Eclipse. This engine is used as a basis for my RCPs to allow users to create their own workflow.

I thought this might come in handy for others too, so I raised bug 365133. In the meantime I was able to extend the framework and added other interpreters as well. Currently Rhino, JRuby and Jython are supported (some better, some worse).

Hoping to get feedback from the community (you!) I release this project into the wild. Check out the project homepage, or dive directly into the source at github.


"What can I do with such an engine?", you may ask.
At my company we use it to automate test equipment, create test patterns and accumulate test results. Therefore we need to commuinicate with lots of lab equipment like oscilloscopes, RFID readers and so on. As our work flows are very dynamic, we provide a script environment along with command sets to easily access these devices. Our users may then create their dedicated tests by implementing their own scripts.

By creating libraries (which are independent of the used interpreter!)  you may extend the script languages with your own functionality. Find an example at the EScript homepage.

You may also access any class available in your IDE and directly call methods on it.


All source is available under EPL terms. Drop me a line if you find it useful or need some support.
Please be aware that despite the Rhino implementation is available for quite some time, other interpreters were added just recently. So be prepared for some surprises :)

1 comment:

  1. Interesting!

    A couple of years ago, there was something similar called Groovy Monkey, which allowed scripting Eclipse in Groovy: http://groovy.codehaus.org/Groovy+Monkey

    ReplyDelete