Sev
Sev

Reputation: 912

Can one import an entire workspace into eclipse?

I have searched around the interwebs and have failed to find the answer to this question so I thought I would ask the wise people here.

I reformatted my computer recently and I backed up all my data including my Eclipse workspace but I failed to export my projects using Eclipse itself. I replaced my workspace file back into Eclipse but it does not show any of my projects as run-able Eclipse projects. Is there a provision to import a whole workspace into Eclipse? Is there information in other files that Eclipse requires or will I just need to manual rebuild the project? Thanks for your help and advice all.

Upvotes: 10

Views: 19997

Answers (3)

Luís de Sousa
Luís de Sousa

Reputation: 6851

You can open directly a Workspace created with an earlier version Eclipse. The new instance will then update the Workspace to the newer metadata configuration. This might prevent earlier Eclipse versions of opening the updated Workspace.

To deal with this I keep Workspaces of different Eclipse versions in different folders, in a structure like this:

Eclipse.Neon
├── Workspace.DomainA
└── Workspace.DomainB
Eclipse.Oxygen
├── Workspace.DomainX
└── Workspace.DomainY

If I wish to import, say, DomainA to Eclipse Oxygen I simply copy it to the Eclipse.Oxygen folder:

cp -r Eclipse.Neon/Workspace.DomainA Eclipse.Oxygen/

And then open that Workspace with Oxygen.

One final note: Workspace management is considerably easier if projects are kept outside its folder, e.g. in a general code versioning folder like git or svn.

Upvotes: 0

PurkkaKoodari
PurkkaKoodari

Reputation: 6809

You can right click on the Package Explorer and select Import. There is an option called Existing projects into workspace. Select that and then select your folder. It will show importable projects. Select them all and import.

Upvotes: 1

Dark Knight
Dark Knight

Reputation: 8357

You need to browse earlier workspace. Projects inside workspace automatically appears in project panel. However if they don't, goto File-> import menu and select "import existing" and browse to project folder in workspace. It should work.

Upvotes: 16

Related Questions