0

Eclipse has projects, what's the purpose of the Workspace that appears to group projects? Projects could live in the directory tree isn't that a more natural way of organizing different projects?

When you first start up Eclipse not knowing much about it, it feels like an unnecessary layer of bloat that new users have to get accustomed to first. You're forced to set up some organizing structure that, although specific to Eclipse, wants to live in the rather general-sounding place ~/Workspace.

Ant6n
  • 1,887
  • 1
  • 20
  • 26
  • 2
    possible duplicate of [Eclipse Workspaces: What for and why?](http://stackoverflow.com/questions/13552266/eclipse-workspaces-what-for-and-why) – Compass Oct 22 '14 at 15:32
  • workspace just embraces a common configuration for different projects. If you use OSGI for instance you will have several projects/bundles within the same workspace – iberbeu Oct 22 '14 at 15:32
  • A new user's first workspace can also be considered the user's `working directory`. For example, MS Word by default saves to `My Documents`. Eclipse' directory where we keep the work is technically `workspace`. It may seem bloated, but it's more practical to have the user point to a place to save their work, rather than pick an arbitrary location. – Compass Oct 22 '14 at 15:34
  • 1
    @Compass potential duplicate yes, but I feel the question wasn't quite answered yet. The 'My Documents' analogy makes sense somewhat -- but at the same time MS Word does not require you to store documents there; and the folder can also be used for other types of documents. It seems for Eclipse there _needs_ to be a workspace folder, and it has meta data, and it's inappropriate to store other kinds of projects there. – Ant6n Oct 22 '14 at 15:43
  • 1
    Marking the question as a duplicate of another unanswered question does not answer the question -- it just buries it again. – Ant6n Oct 22 '14 at 15:56
  • Eclipse does not require you to store your projects in the Eclipse folder. You can store them wherever you want so long as you tell Eclipse where it is. The workspace also stores your user settings so that you can, for example, have different GIT/PROXY set-ups for different projects. Through normal operations of keeping everything in the workspace folder, you make the workspace portable and allow it to work with any install of Eclipse as long as the right JVM is available. – Compass Oct 22 '14 at 16:08

1 Answers1

0

The workspace is a collection of projects and the metadata that cannot be included in a project because it's not portable (references paths and resources on a specific system) or because it pertains to Eclipse as a whole.

Without the workspace concept, opening a project in Eclipse would be followed by multiple steps of getting things configured. This information would be lost when Eclipse is closed or all projects you ever work on would have to share the same configuration.

Examples of metadata stored in workspace:

  1. Locations of available JDK's and JRE's. The project references a JRE by name, the workspace metadata is needed to resolve that reference.

  2. Locations of application servers.

  3. Path variables.

  4. Open perspectives, layout of views, etc. Consider one application where you need Git and app server vs another application where you need SVN and Android development tools. The views you'd want to keep open and how you'd arrange these views would be very different for two applications.

Konstantin Komissarchik
  • 28,879
  • 6
  • 61
  • 61