creating new eclipse project using APIs getting error when using same workspace [message #876523] |
Thu, 24 May 2012 15:16  |
Eclipse User |
|
|
|
Hi
When creating a new project using APIs getting error "project1_upd overlaps the location of another project: 'Project1_upd'". Project1_upd is my upgraded project and there is only one project.
Here are the steps i am following.
1. Created a project "Project1" from eclipse and saved the project in workspace.
e.g. c:\eclipse\workspace.Closed the eclipse
2. Opened a new eclipse which is having latest plugins but using same workspace. In
my case it is c:\eclipse\workspace
3. Once Project1 is selected / opened , am creating new project with name
'Project1_upd' programmatically and trying to load it into workspace using below
code
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProjectDescription projDescription;
try {
projDescription = workspace.loadProjectDescription((new
Path(upgradedProjectPath+"/.project")));
//To add new project name in .project file
projDescription.setName(new File(upgradedProjectPath).getName());
IProject iProject =
workspace.getRoot().getProject(projDescription.getName());
iProject.create(projDescription, null);
iProject.open(null);
// and then adding project nature , associating builder and other
// things
}catch(Exception e ){
4. Please note that everything works perfectly if i select a different workspace in
step 2
Thanks,
Suresh Nallamilli
|
|
|
|
Powered by
FUDForum. Page generated in 0.02477 seconds