it's just a feature for structuring projects. obviously eclipse designers tried to avoid having global settings for eclipse and decided to put them into workspace. each eclipse app depends on each workspace settings. is it a good decision? i think it's not so. it lacks flexibility. it was naive to expect that global settings can be avoided. it doesn't allow you to have single projects (it can be a surprise for eclipse designers but it happens quite often). but it still works. many people use it. sometimes they suffer but more frequently everything is ok.


although i've used eclipse for years, this "answer" is only conjecture (which i'm going to try tonight). if it gets down-voted out of existence, then obviously i'm wrong.

oracle relies on cmake to generate a visual studio "solution" for their mysql connector c source code. within the solution are "projects" that can be compiled individually or collectively (by the solution). each project has its own makefile, compiling its portion of the solution with settings that are different than the other projects.

similarly, i'm hoping an eclipse workspace can hold my related makefile projects (eclipse), with a master project whose dependencies compile the various unique-makefile projects as pre-requesites to building its "solution". (my folder structure would be as @rafael describes).

so i'm hoping a good way to use workspaces is to emulate visual studio's ability to combine dissimilar projects into a solution.


basically the scope of workspace(s) is divided in two points.

first point (and primary) is the eclipse it self and is related with the settings and metadata configurations (plugin ctr). each time you create a project, eclipse collects all the configurations and stores them on that workspace and if somehow in the same workspace a conflicting project is present you might loose some functionality or even stability of eclipse it self.

and second (secondary) the point of development strategy one can adopt. once the primary scope is met (and mastered) and there's need for further adjustments regarding project relations (as libraries, perspectives ctr) then initiate separate workspace(s) could be appropriate based on development habits or possible language/frameworks "behaviors". dltk for examples is a beast that should be contained in a separate cage. lots of complains at forums for it stopped working (properly or not at all) and suggested solution was to clean the settings of the equivalent plugin from the current workspace.

personally, i found myself lean more to language distinction when it comes to separate workspaces which is relevant to known issues that comes with the current state of the plugins are used. preferably i keep them in the minimum numbers as this is leads to less frustration when the projects are become... plenty and version control is not the only version you keep your projects. finally, loading speed and performance is an issue that might come up if lots of (unnecessary) plugins are loaded due to presents of irrelevant projects. bottom line; there is no one solution to every one, no master blue print that solves the issue. it's something that grows with experience, less is more though!


the whole point of a workspace is to group a set of related projects together that usually make up an application. the workspace framework comes down to the eclipse.core.resources plugin and it naturally by design makes sense.

projects have natures, builders are attached to specific projects and as you change resources in one project you can see in real time compile or other issues in projects that are in the same workspace. so the strategy i suggest is have different workspaces for different projects you work on but without a workspace in eclipse there would be no concept of a collection of projects and configurations and after all it's an ide tool.

if that does not make sense ask how net beans or visual studio addresses this? it's the same theme. maven is a good example, checking out a group of related maven projects into a workspace lets you develop and see errors in real time. if not a workspace what else would you suggest? an rcp application can be a different beast depending on what its used for but in the true ide sense i don't know what would be a better solution than a workspace or context of projects. just my thoughts. - duncan


i'll provide you with my vision of somebody who feels very uncomfortable in the java world, which i assume is also your case.

what it is

a workspace is a concept of grouping together:

  1. a set of (somehow) related projects
  2. some configuration pertaining to all these projects
  3. some settings for eclipse itself

this happens by creating a directory and putting inside it (you don't have to do it, it's done for you) files that manage to tell eclipse these information. all you have to do explicitly is to select the folder where these files will be placed. and this folder doesn't need to be the same where you put your source code - preferentially it won't be.

exploring each item above:

  1. a set of (somehow) related projects

eclipse seems to always be opened in association with a particular workspace, i.e., if you are in a workspace a and decide to switch to workspace b (file > switch workspaces), eclipse will close itself and reopen. all projects that were associated with workspace a (and were appearing in the project explorer) won't appear anymore and projects associated with workspace b will now appear. so it seems that a project, to be open in eclipse, must be associated to a workspace.

notice that this doesn't mean that the project source code must be inside the workspace. the workspace will, somehow, have a relation to the physical path of your projects in your disk (anybody knows how? i've looked inside the workspace searching for some file pointing to the projects paths, without success).

this way, a project can be inside more than 1 workspace at a time. so it seems good to keep your workspace and your source code separated.

  1. some configuration pertaining to all these projects

i heard that something, like the java compiler version (like 1.7, e.g - i don't know if 'version' is the word here), is a workspace-level configuration. if you have several projects inside your workspace, and compile them inside of eclipse, all of them will be compiled with the same java compiler.

  1. some settings for eclipse itself

some things like your key bindings are stored at a workspace-level, also. so, if you define that ctrl+tab will switch tabs in a smart way (not stacking them), this will only be bound to your current workspace. if you want to use the same key binding in another workspace (and i think you want!), it seems that you have to export/import them between workspaces (if that's true, this ide was built over some really strange premises). here is a link on this.

it also seems that workspaces are not necessarily compatible between different eclipse versions. this article suggests that you name your workspaces containing the name of the eclipse version.

and, more important, once you pick a folder to be your workspace, don't touch any file inside there or you are in for some trouble.

how i think is a good way to use it

(actually, as i'm writing this, i don't know how to use this in a good way, that's why i was looking for an answer – that i'm trying to assemble here)

  1. create a folder for your projects:

  2. create a folder for each project and group the projects' sub-projects inside of it:

  3. create a separate folder for your workspaces:

  4. create workspaces for your projects:

Related Query

More Query from same tag