capint
8/23/2016 - 9:44 AM

Eclipse >> Resource >> Move project

Eclipse >> Resource >> Move project

// Create a project
IProject project = workspace.getRoot().getProject(projectName);
IPath projectPath = new Path(path.removeLastSegments(2) + "/" + projectName);
IProjectDescription tmpdesc = workspace.newProjectDescription(projectName);
ProjectGenerationHelper.createProject(tmpdesc, project, null, progressMonitor);

// Move the created project to new location
IProjectDescription desc = project.getDescription();
desc.setLocation(projectPath);
project.move(desc, true, progressMonitor);