A few months ago, I wrote about using the p2 director to control where you install plugins & features.
Here's the other approach I mentioned in that article -- using the p2 Update UI and a little filesystem trickery.
- Use the p2 Update UI (Help > Software Updates... > Available Software) to install what you want. When prompted to restart, click No -- DO NOT RESTART OR APPLY CHANGES.
- Open a console window and run
./moveInstall.sh foo 10to move all plugins and features created in the last 10 minutes from ./plugins and ./features into ~/eclipse/eclipse-plugins-foo, then link them from ./dropins/foo.link.
Note that the name, foo, is arbitrary -- it can represent the specific feature set you just installed (eg., "jet" for JET plus dependencies) or it could be something generic like "team", where I've got plugins for Mylyn, Tasktop, Subclipse, CVS, JIRA, and Bugzilla. You can also add/replace plugins & features in an existing folder by running the script again.
- Use the p2 Update UI (Help > Software Updates... > Revert Configuration) to revert the changes you just installed by selecting the timestamp of the configuration from BEFORE you installed the plugins & features in step 1.
Since you moved the files when Eclipse wasn't looking, it simply removes the p2 metadata, but can't delete the plugins and features.
- When prompted, restart Eclipse. On restart, the new plugins & features will be loaded.
Because the new plugins & features are not in the Eclipse root, you can now use those plugins with multiple versions of Eclipse -- just copy the foo.link file into another Eclipse's dropins/ folder.
This is perfect for testing milestone builds without having to reinstall everything each time.
Of course it's so easy to do this in shell script I have to wonder why p2 can't do it under the covers so we can get back the old functionality from Eclipse 3.3...