Been trying to get this figured out for a few days, so please don't flag as a duplicate.
What I want is the following:
- One Eclipse installation, i.e. Eclipse-3.7-64bit-RCP
Multiple "configurations" that use (1) to run, i.e.:
- Python configuration with plugins like PyDev
- Scala configuration with plugins like ScalaIDE
Multiple workspaces, like:
- UI (will use /ui workspace and Python configuration)
- Logic (will use /logic workspace and Scala configuration plugins)
So what you have in the end are just two shortcuts:
The problem is, "configuration" parameter is not behaving as I supposed it would. It seems its doing some kind of "shared" configuration area of some sort... in a sense that the directory [path-to-config] is actually being populated with folders like p2, plugins etc...
Whereas one would think that [path-to-config] would only contain subfolders python and scala.
Ok, so I've figured this out. It is a little confusing, but stick with me here.
The key is to have a subdirectory inside your config directory.
So instead of simply defining an Eclipse shortcut with a configuration parameter like this:
-configuration [path-to-config]/Python
-configuration [path-to-config]/Scala
one must create a further "subdirectory" inside Python or Scala configuration directories respectively. Any directory name will suffice, I use config
:
-configuration [path-to-config]/Python/config
-configuration [path-to-config]/Scala/config
I suspect this might have something to do with parent directory of the configuration being used to store some kind of shared configuration. By defining an extra subdirectory we are probably preventing Eclipse from knowing about the other configuration altogether.
In any case, if you define your -configuration as above, each Eclipse started will have it's own set of plugins.
So, as an example these two shortcuts:
[path-to-installation]/eclipse -configuration [path-to-config]/Python/config
-data [path-to-workspace]/ui
[path-to-installation]/eclipse -configuration [path-to-config]/Scala/config
-data [path-to-workspace]/logic
launch the same Eclipse installation, with completely different, indepenent sets of plugins, and use different workspaces.
The configuration directory contains the runtime-install information of the current eclipse. But by default there is usually a p2/ directory at the same level as the configuration directory, which contains p2 profile information and the plugin version lineups. On top of that, the base eclipse install (the bundle pool) is in plugins/ and features/ directories at the same level as p2/ by default.
With p2 doing the underlying provisioning, you can do things like create a shared bundle pool (with all the plugins) but still create separate configuration directories and p2 profiles to controls which plugins are launched. But it sounds like you want the extra plugins (like scala and python) in their own separate directories, not in the common bundle pool.
You will have to investigate the mysteries of p2 if you want to create a layout like that. A good starting point:
- p2 director
- blog: Multiple Architecture, Single Build
- blog: Adventures in Multi-Architecture Eclipse
- Bug 342156 - p2 director ignored bundlepool when using -roaming