4.1. Multiple workspaces

4.1.1. Why?

Why would any one like to have multiple workspaces?

Why? is the most boring question. How is what we should look forward to. But for the impatient, here are possible reasons why multiple workspaces are a good idea.

4.1.1.1. Project Name

Eclipse has a severe limitation. It cannot have two projects of the same name in one instance/workspace. If you are working on different versions or branches of the same project, Eclipse would not allow you to keep them in workspace. Under such situation, you would like to have different workspaces.

4.1.1.2. Shared installation

If the complete development team uses same installation of Eclipse, every developer should not be allowed modify the configuration stored in Eclipse. For these reasons explicitly mention your workarea in command line parameter.

4.1.1.3. Too Much Clutter

Possibly, you are a very big fan of Eclipse and you would create every project in eclipse. If your default Eclipse installation has many projects, you may choose to group projects and make them part of different workspaces.

4.1.1.4. Workspace settings

Few settings are stored by default in workspace. If you are working on different project with different requirements, you may choose to use different Workspace.

e.g. Eclipse settings on using White Spaces is stored in workspace. If your projects use different settings, it would be advisable to use different workspace for these projects.

4.1.2. Set workspace via Command Line

The command line parameter for workspace is --data

If you run Eclipse as eclipse -data d:\eclipse.workspace, Eclipse would start using the workspace as d:\eclipse.workspace

4.1.3. Create a Desktop shortcut for Workspace

If you want to create Windows shortcut to start Eclipse with default shortcut,

  1. Right Click on the Windows Desktop
  2. Select New → Shortcut
  3. Select Browse. Point to the Eclipse executable
  4. Add -data D:\eclipse.workspace2

The newly created shortcut will use D:\eclipse.workspace2 as the default workspace.

4.1.4. Create preferences to use a default workspace

You can either choose a default workspace, or let Eclipse ask you every time to choose a workspace (if you do not specify which workspace to be used).

Eclipse preferences to select startup workspace behaviour

Eclipse preferences to select startup workspace behaviour