How to share Eclipse configuration over different workspaces

后端 未结 11 2205
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 03:54

I\'m using Eclipse (PDT) as primary IDE on different machines. (like at home, laptop, in office, etc.). How could I share the Eclipse and project configuration pragmatically

相关标签:
11条回答
  • 2020-12-02 04:49

    I had to work on multiple workspaces simultaneously and there were a lot of preferences to be set each time I create a new workspace. I created a template workspace and created all the the required settings in that template workspace.Whenever I create a new workspace, I create a simlink of the {new_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings to point to {template_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings. So, when you edit any preference in any of the workspaces, it will be replicated across all other workspaces.

    I created this function alias in my .profile so that once I create a new workspace, I run this function in my command prompt with my new workspace name as argument so that the link is created.

    function eclset(){
        present_dir=`pwd`;
        cd  {parent_to_workspace}/$1/.metadata/.plugins/org.eclipse.core.runtime ; 
        rm -rf .settings ; 
        ln -s {parent_to_workspace}/template/.metadata/.plugins/org.eclipse.core.runtime/.settings .settings;
        cd $present_dir;
    }
    
    0 讨论(0)
  • 2020-12-02 04:54

    It's a relatively new project, but it looks like Eclipse Oomph was created for exactly this reason. Through this tool you can create a unique configuration that can be shared with others. I have not used it (yet), but am planning to:

    https://projects.eclipse.org/projects/tools.oomph

    0 讨论(0)
  • 2020-12-02 04:54

    There are two questions here. First, there are project definitions, the .project files and project specific settings. Personally, I like those in my source control, as it makes checking out a project and setting up an IDE much easier.

    Second, you have the workspace settings. You will see a lot of questions in this area. I suggest taking a look at Pulse: it is an enhanced Eclipse distribution that can, among other things, save your workspace settings and sync them with multiple machines or team members.

    0 讨论(0)
  • 2020-12-02 04:55

    As of Eclipse Neon (and possibly Mars, as well), you can copy the following two directories, to share your workbench and settings/preferences amongst your different workspaces:

        [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings
        [workspace]/.metadata/.plugins/org.eclipse.e4.workbench
    
    0 讨论(0)
  • 2020-12-02 04:56

    You can also copy the .prefs files from ${old_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings to a folder called .settings in the root folder of your project and then add it to SVN (or CVS or ...)

    That way the settings will get distributed to all developers along with the source code during an Update.

    0 讨论(0)
提交回复
热议问题