Single Eclipse install with multiple Configurations and Workspaces

后端 未结 2 1160
轮回少年
轮回少年 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.

提交回复
热议问题