Reputation: 12827
I am working with Eclipse everyday, and I have a good 80 projects in my workspace, well organized.
We are using version control for our projects.
Every once in a while, we create a new branch.
I have to work on different branches everyday, so I like to keep them locally.
So basically, my file explorer looks like this :
- dev
- eclipse_workspaces
- workspace_16
- workspace_17
- workspace_trunk
-source
-trunk
-project1
-project2
-....
-branches
-1.6
-project1
-project2
-....
-1.7
-project1
-project2
-....
Each workspace is set up to work with one of the branches. The main issue I have is that every time we create a new branch, I have to start my workspace over. Reconfigure all my settings, recreate my working sets, and reimport all my projects by hand.
It looks to me like it should be possible to "clone" an existing workspace, and just change the project's location from "C:/dev/source/trunk" to "C:/dev/source/branches/1.7" for example.
I found other solutions on how to do it for ONE project, but I basically want to do that for ALL my projects every time.
I also created a small java program to automate this idea, but without luck so far. On top of it, this solution would slowly get outdated as new projects use a different system, with tree files.
Has anyone ideas on how to "clone" a workspace, while only changing the location of the projects?
Upvotes: 1
Views: 329
Reputation: 579
You can copy an existing workspace, delete its projects (the working sets will stay), and import all projects from the new branch in one step. The existing working sets will be empty, but you can adjust them on demand (only when you want to open it) with 'Edit Active Working Set...'.
Upvotes: 1
Reputation: 8849
I think you can use Workspace Mechanic for this.
Refer posts:
How can I set up Eclipse workspace mechanic to share settings?
How Do You Set Eclipse's Default Settings for When You Create New Workspaces?
How to import a preference file in eclipse with the launch of eclipse?
Eclipse sync workspaces/perspectives/preferences across computers
This solves:
Importing preferences on each and every new workspace.
Also in eclipse luna when switching workspace it ask whether to copy settings like workbench layout and working sets. select these options while switching workspace.
Look at Share / Export eclipse working sets.
Upvotes: 2