Please Visit our new Blog at http://kichwacoders.com

Leveraging the Power of the Plug-in

The beauty of the Eclipse platform lies in its plug-in architecture. This extensible architecture was the key motivation for migrating Diamond Light Source's existing IDE (GDA) to the Eclipse platform. In doing so it was hoped that the GDA would benefit hugely by being able to leverage open source plug-ins. Work began on developing a rich-client platform (RCP) prototype to try to achieve this goal.

In developing the prototype, this goal was quickly demonstrated. The GDA had a custom log panel which was used to display log messages. In Eclipse, the logback plug-in was dropped into the prototype and this instantly gave an equivalent log console that was able to display the log messages - without requiring a single line of code change. In addition, the new log console came with additional features the original lacked, such as the ability to configure the message properties. It was not all plain sailing though, as one issue with using the logback plug-in was managing the versioning. On upgrading to a newer version of the plug-in the console failed to work, meaning that GDA could not take advantage of the latest version until the issue was fixed. When incorporating third-party plug-ins it is up to the user to ensure they contend with handling the versioning and compatibility of the plug-ins. The more they are in touch with the plug-in providers, the easier issues can be resolved.

Following on from the quick success of the logback plug-in, the next step was to attempt to use the Pydev plug-ins to provide a Jython editor and Jython console to replace those of the existing IDE. This was trickier to do, but nonetheless after going through the readily-available code and understanding how things worked, we were able to provide a fully-featured Jython editor and console in a relatively short time. In addition we were able to integrate the plug-ins with the existing codebase in such a way that it allowed auto-completion on not just Jython keywords but also GDA system specific functions. It was a great example of leveraging open source plug-ins out there. Some of the issues in general with using the Pydev plug-ins revolved around the dependencies - for example using the editor plug-in relied on pulling in the JDT plug-ins which then introduced unwanted functionality into the GDA RCP prototype. Once again these issues can be resolved, even more so by working closely and contributing back to the Pydev project.

In addition, we were also able to demonstrate integration with the Desy project. Using their plug-ins we were able to use their Signal Probe view and connect up the GDA back-end to it to generate the data. This was done after alot of time understanding the code-base and done to a prototype level, but nonetheless showed how two independent plug-ins developed within the same field could be used together thanks to the Eclipse plug-in architecture.

Thanks to the nature of Eclipse's plug-ins, IDE providers are able to take advantage of existing code-bases to obtain functionality that would take months to develop in-house. Also code bases can be shared between different institutions, thereby helping pave way for setting standards within the field. Of course to receiving the maximum benefit comes by working closely with those who produced the code in the first place - but the more you put in the more you get out.