views:

276

answers:

3

I have two projects, Project1 and Project2.

Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below.

Eclipse Workspace -> Project -> Project1, Project2

i.e Project1 and Project2 should be in folder Project in Workspace folder.

How to do this in eclipse?

+1  A: 

There really isn't an Eclipse specific solution to this problem. Even if you import the projects in to Eclipse, the only way to arrive at the directory structure you desire is to move the files around in Eclipse.

An easier solution would be to create the desired directory structure somewhere on the filesystem and then use Eclipse's import existing source feature.

Steve Levine
Even with the correct structure in the filesystem the OP would be faced with a decision of a single project in the workspace with two folders, or having the same workspace view of two projects, without any structure, which seems against the intent..
Mark E
+3  A: 

Take a look at working sets.

In Eclipse, Working Sets provide a convenient way to collect projects together into a sort of holding-folder. This folder exists only in some "meta" sense, and single projects can belong to multiple working sets.

The link above shows a video of these in action. I had been looking for convenient way to collect projects together to ease my searching for specific projects in large workspaces and have found this small bit of organization helps quite a bit.

Mark E
A: 

You can define an eclipse Project (i.e. a .project and .classpath) with two folders Project1 and Project2 as linked folders (see this answer for more, or this one)

alt text

But that involve recreating the combined settings of Project1 and Project2 into Project (i.e. declaring two src folders, listing all compilation jar dependencies for both project as dependencies for Project, and so on)

VonC