Thursday, July 26, 2007

Execute them! Bogus.

Many of the Eclipse projects are presented as Platforms, but to make a successful platform you have to balance at least two factors in much the same way as an economist: the value provided and cost incurred. The value added is simply the feature set--is there something of use in there? The other factor, cost, is made up in part by the requirements. For Eclipse plug-ins this is often only thought of as which plug-ins it requires to run, but there's also the Execution Environment to consider.

One of the great things about the PDE is that when you specify an Execution Environment for plug-in projects and have matching Installed JREs within the preferences, it will automatically target your plug-in projects to use the right JRE. No more warnings about generics in a project that hasn't adopted Java5 syntax or about not supporting them in the targeted JRE. This even lets you build plug-ins specific to each environment if needed, allowing for multiple implementations of the same functions, or more commonly the graceful deactivation of certain features when running in older environments.

The larger ramification is that the Execution Environment is now every bit as critical to think about as the plug-in and version dependencies. If you are developing a plug-in that specifies an Execution Environment of J2SE-1.4 but has a dependency on a plug-in specifying an Execution Environment of J2SE-1.5, your plug-in now implicitly has an Execution Environment of J2SE-1.5 as well. Conversely, the Execution Environment you specify on your plug-in has a direct effect on how readily it can be used by someone else, and that affects the cost of adopting your platform. It's little surprise that much of the Eclipse Platform as we know it requires J2SE-1.4 or less. So keep in mind the Execution Environment you choose for your plug-ins--some day you might find it running in the most unexpected of places.

About Me

Nitin contributes to the Source Editing and JSDT projects in the Eclipse Web Tools Platform project. He has been known to watch many, many, people in Bugzilla and can often be found "lurking" in Eclipse-related IRC channels.