09 February 2009

Use Dropins to Make Eclipse Plugin Management Easier

In Eclipse 3.3 I used to manage plugins by keeping them all in a local site that was a completely separate directory from my eclipse directory. In Eclipse 3.4, this functionality was more or less eliminated as adding a local site actually copies the plugin into the features and plugins dirs under the Eclipse dir. But last Summer I discovered a feature in Eclipse 3.4 that makes managing plugins much easier named dropins.

This is nothing more than a known watched directory named dropins that is scanned at startup. There are some additional features, but this is the basic functionality. It supports a few different formats but the one I've used is demonstrated below. In the base eclipse dir, I create a dir named dropins. Then I manually download and expand plugins that I'd like to use into the dropins dir. For example, here are the contents of a dropins dir I've used:


$ ls -1 ./eclipse/dropins/
GEF-SDK-3.4.1
GEF-zest-sdk-3.4.1
ajdt_1.6.0_for_eclipse_3.4
dtp-sdk_1.6.1
emf-runtime-2.4.1
mylyn-3.0.3-e3.4
site-1.4.3
wtp-sdk-R-3.0.2-20080921203356
xsd-runtime-2.4.1


The contents of the GEF-SDK dir looks like this:


$ ls -1 ./eclipse/dropins/GEF-SDK-3.4.1/eclipse/
epl-v10.html
features
notice.html
plugins
readme


This is nothing more than an expanded copy of the GEF-SDK. Instead of being expanded into the base eclipse dir, it's expanded into a dir of its own inside the dropins dir. so the contents of the features dir is here:


$ ls -1 ./eclipse/dropins/GEF-SDK-3.4.1/eclipse/features/
org.eclipse.draw2d.sdk_3.4.1.v20080806-67718083A56B4H3F84A-__6_2A32
org.eclipse.draw2d.source_3.4.1.v20080806-3307w31191_2102462
org.eclipse.draw2d_3.4.1.v20080806-3307w31191_2102462
org.eclipse.gef.sdk_3.4.1.v20080806-7B7E297OK9c7WEeDMZJfHVNDRBPX
org.eclipse.gef.source_3.4.1.v20080806-67718083A56B4H2A3213573
org.eclipse.gef_3.4.1.v20080806-67718083A56B4H2A3213573


And the contents of the plugins dir is here:


$ ls -1 ./eclipse/dropins/GEF-SDK-3.4.1/eclipse/plugins/
org.eclipse.draw2d.doc.isv_3.4.1.v20080806.jar
org.eclipse.draw2d.source_3.4.1.v20080806-3307w31191_2102462
org.eclipse.draw2d_3.4.1.v20080910-1351.jar
org.eclipse.gef.doc.isv_3.4.1.v20080806.jar
org.eclipse.gef.examples.ui.pde_3.4.0.v20080226.jar
org.eclipse.gef.source_3.4.1.v20080806-67718083A56B4H2A3213573
org.eclipse.gef_3.4.1.v20080806.jar


This makes managing many plugins in many different Eclipse instances much easier. But I must warn you that troubleshooting can try your nerves. If the contents of a dir is not formatted correctly, Eclipse just won't load the plugin. Though Eclipse does output some errors to the $WORKSPACE/.metadata/.log file which can be very handy.

No comments:

Post a Comment