nand
nand

Reputation: 117

import existing project into eclipse using plugin or javacode

If we want to import an existing project, we do the following

 File->import->general->Existing project into workspace->Select project….->Finish.. 

Can we do the same by using javacode or eclipse-plugin… Is there any such code available….

please help me...

Upvotes: 1

Views: 1465

Answers (2)

user1584844
user1584844

Reputation: 276

IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(  new Path("PROJECT_PATH/.project"));
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName());
project.create(description, null);
project.open(null);

Upvotes: 5

Fredrik
Fredrik

Reputation: 10656

Very unclear what you want to achieve..

If what you are looking for is a way to easily to share a project setup between developers, then there is a way using project sets. The link uses CVS as example, but it exists for other version control systems.

Upvotes: 0

Related Questions