I am creating an eclipse plugin to do both git clone & import together.
My code snippet for the eclipse import as bellow:
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);
IOverwriteQuery overwriteQuery = new IOverwriteQuery() {
public String queryOverwrite(String file) {
return ALL;
}
};
ImportOperation importOperation = new ImportOperation(project.getFullPath(), new File(PROJECT_PATH),
FileSystemStructureProvider.INSTANCE, overwriteQuery);
importOperation.setCreateContainerStructure(false);
importOperation.run(new NullProgressMonitor());
This is working, but it's creating another copy of our cloned project, at workspace.
Is there any way to do something like, Import without "copying projects into workspace"?