[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Workspaces vs Projects

Paul wrote:

My application is comprised of several components. I want each of these components to be a separate project. I have several development environments on my machine (for different versions I am working on at the same time), each one containing a set of my components. If I have a project that equates to one of my environments, then each of the components under it is not a project, so that's no good to me. And if I have a project for each of my components, I need to name them so that they don't clash with the same component under a different development environment.
When you do a Search you get the option to search a Workspace. Would I be right in thinking Workspaces is what I need? If so, how would I go about creating them?
Many Thanks,
Paul

First to make sure I understand, you have several different versions of a given component in different development environments. For example you are working on version 1 of component A in one environment and version 2 of component A in another environment.


If this is the case, workspaces will likely help, but only if you have a source code control tool that manages the different component versions.

Create a workspace for one of your environments (/workspaces/environment1). In that workspace, create a project for each of the components in the environment. When creating the projects, check the Create project from existing source on the New Project Wizard. Browse to the directory containing the component and select it. Eclipse will attempt to determine you source/package structure, Check it to make sure it is correct. You can now check the .classpath and .project files into your source code control system.

The .classpath and .project files need to be in the root directory of the component in each of your environments. You can use your SCM tool to get a copy or copy it by hand. Create a separate workspace for each environment. The second and subsequent environments will use the classpath and .project files to define your projects in that environment.