Reputation: 531
by below code, I could create eclipse project programmatically, but I should check if project existing or not before creating it, if not existing, it should be created, otherwise, it should be refreshed, any hints will be more than welcome!
IProjectDescription description = null;
IProject project = null;
description = ResourcesPlugin.getWorkspace().loadProjectDescription(
new Path(new File(projectfolder).getAbsolutePath()
+ "/.project"));
project = ResourcesPlugin.getWorkspace().getRoot()
.getProject(description.getName());
project.create(description, null);
//project.refreshLocal(IResource.DEPTH_INFINITE, new org.eclipse.core.runtime.NullProgressMonitor());
project.open(null);
Upvotes: 0
Views: 84