Single Eclipse install with multiple Configurations and Workspaces

后端 未结 2 1149
轮回少年
轮回少年 2020-12-29 14:50

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:

  1. One Eclipse installation, i.e.
相关标签:
2条回答
  • 2020-12-29 15:39

    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.

    0 讨论(0)
  • 2020-12-29 15:52

    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
    0 讨论(0)
提交回复
热议问题