Should there be one workspace per project, or all the projects in one workspace? Personal choice
- If there are a large number of projects in your workspace (work, personal, side-work, etc...) it's best to split those projects into different workspaces and then close them when you're not working on them. It's amazing how much startup time, compile time, memory usage, and just outright performance by Eclipse improves once you've done this. It is a bit of a pain getting each workspace set up exactly identical to eachother so that there's no apparent difference in your workflow, but the best way is probably to create an empty workspace, configure it how you like it, and then copy that empty workspace as a template for each new workspace you create.
Reasons to use multiple workspaces in Eclipse:
- If working with multiple releases of a coding project, check out each it's own workspace.
- Performance improves by having fewer projects in a workspace
- Each workspace houses a collection of projects, so it was determined that creating multiple workspaces was a good way to get organized. I created a new workspace, specific to the client the project was, and created two projects – one for the front end and one for the back. They each had their own build.xml files to manage building, and the new layout made FDT work extremely well (by giving it it's own project).
- start a new application for a client, automatically give them their own workspace
Reasons not to use multiple workspaces in Eclipse:
- creating separate and numerous workspaces is counterproductive, as you have to manage that many Eclipse shortcut icons on your desktop and also cannot take advantage of the visibility of multiple projects at one time. My current thinking is to put most of the projects in just one workspace.
- Don't use the default workspace - If you are going to use one workspace, one thinking is, "Why not use the default workspace and not worry about creating a new one?" This will work if you keep your projects outside of this directory. Otherwise, when you install a new Eclipse, you may inadvertently delete stuff from the old install directory.
Eclipse settings are saved in workspace, in .metadata/.plugins/org.eclipse.core.runtime/.settings directory. Copy this into new workspace directories.
About workspaces and projects...
I don't get the idea of having multiple workspaces. For me natural and easier is to have just one workspace.
It's particularly useful when one has for example projects which jars are dependencies to another project. You can easily switch to sourced-version of the dependant by using project instead of jar file (for debugging for example)
Separate copies of Eclipse are used for each separate workspace opened simultaneously. Request to open multiple workspaces in one copy fo Eclipse
Running Eclipse with the -clean argument cleans up a workspace. Three different ways to use it:
- Add it as the first argument in the eclipse.ini.
- First argument on the command line
- Batchfile that calls eclipse with the argument
Sometimes the clean argument doesn't help.
Preferences can also be exported from an old space, and imported to a new space.
Use -showlocation argument to put workspace name in the title bar.
Sources:
- http://tkramar.blogspot.com/2008/06/create-new-eclipse-workspace-with-all.html
- http://www.eclipsezone.com/eclipse/forums/t61566.html
- http://eclipsesource.com/blogs/2010/05/21/how-to-structure-two-dozen-eclipse-workspaces/ - using yoxos launcher
- http://www.ibm.com/developerworks/library/os-ecl-manage/
- http://today.java.net/pub/a/today/2005/03/02/eclipseStarter1.html
- http://www.darronschall.com/weblog/2006/01/getting-friendly-with-eclipse-workspaces.cfm