Scripting in Eclipse RCP-based applications
Scripting is widely used to automate software processes. Moreover, scripting is used to facilitate customized solutions, such as developing new features quickly or making workflows easily reproducible. Therefore the focus of this work is to enable a seamless interaction of the script with the OSGi bundles of its surrounding RCP application. To address this, we implemented a Jython support in OpenChrom. Jython, is an alternative Python implementation, became popular during the past years as it runs on the JVM. Although there are decent scripting solutions in the Eclipse ecosystem already available like EASE or the PyDev IDE platform, but one has to expose the methods of an RCP application to use with the script manually. An automated approach would be desirable so that all public methods of the surrounding OSGi bundles are visible and automatically exposed to the Jython script editor. We will show, what obstacles we faced and how we solved them, namely:
* choosing the right interpreter for scripting from various Python implementations (Jython, Py4J, etc.)
* evaluating existing solutions such as integrating the EASE scripting engine or the PyDev IDE platform
* exposing OSGi bundles to the Python world to access the underlying functions on the application
* integrating a light-weight IDE into the software, with features like coloring, auto completion or importing the classes automatically
* accessing complex Java classes through command shells such as IPython, which also can also help analyzing and visualizing the results.
Parallel to the live demo, we will also release the source code of the reference implementation under EPL.
Janos Binder