Wednesday, April 29, 2009

Eclipse PDE Target Platform Provisioning

Now finally something that I think P2 will do that will kick butt. Chris Aniszczyk, Eclipse PDE *co-lead, has announced on his blog that Eclipse 3.5 M7 will have a feature that can provision your Eclipse Platform Target for your Eclipse Plugin/RCP based work. Why could this be cool? Well one of the headaches in writing Eclipse plugins(bundles) is the need to establish the target platform. You can try a maven repository or the like, but as everyone knows, the best way to write an Eclipse plugin is to use the Eclipse PDE, or more succinctly, use Eclipse to build Eclipse.

So up until now the only way to do this was to setup an alternate installation of Eclipse and point your target platform setting at it. This works moderately well if you only need something like the Eclipse SDK or the Eclipse RCP packages. The problem is often setting up your platform when you need other bundles (particularly when you need something like Eclipse WTP or BIRT for instance). You need to go download all the bundles required for you to develop and build your Eclipse based product. What you wind up doing (especially if you are me) is going to download all the SDK archives that are likely to contain all the bundles you require. This leads to bloat, is a bit sloppy, makes management of that platform a pain, but it has the advantage of working quickly.

Never heard of a Eclipse Platform target for Plugin development and you have written any number of Eclipse plugins? Well that is because by default the platform target is set to your current Eclipse installation. Also I believe you probably have not had to support a plugin in the field for real. Why? Because if you have never heard of a Target platform, you have never had to worry about the version of Eclipse your plugin is running in. Another factor is if you are like me and like to run the later milestone versions of Eclipse, while deploying your Plugin/RCP Application on the current released version of Eclipse.

So enough background, this blog entry describes that as of Eclipse 3.5M7 it will use the Eclipse P2 Update mechanism to allow you to point at a URL for a platform that you are developing against. The new Eclipse PDE will take care of downloading all those plugins for you. That is cool beyond description, well unless you like creating target platforms and going through the extra mile to remove unneeded plugins. In fact, this is the kind of coolness I felt when I first saw how Maven can download all your project dependencies for you (I know Maven does far more, but for me it is far and away the killer app).

I know that an Eclipse RCP application I have worked on in the past had a target platform that was huge, where 80%+ was unneeded, but paring that down had to be balanced against the time required to remove unnecessary components and having it work correctly. This has the promise of doing 90%+ of that work for you. Taking the downloading out is one major step forward. I am hoping that you can use it to pare down the collection of bundles in your target platform. That would absolutely rock...

Update: I think this will pare things down if paired (love the pun there) with a new feature in Eclipse JDT called 'Runnable Jar-in-Jar Exporter' Nice... Nice... Just wondering who the heck named that feature? Runnable Jar-in-Jar Exporter? Oh well as my grandmother used to say, "If wishes were horses, beggars would ride..."

Update: I have been corrected, Chris Aniszczyk is the Eclipse PDE co-lead along with Darin Wright. Lord knows, since I work alot with Eclipse, I don't want either one of those dudes annoyed at me. ;)


1 comment:

Chris Aniszczyk (zx) said...

As a correction, I'm the co-lead of PDE. PDE is lead by me and Darin Wright from IBM.

Glad you like the feature ;)