Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » creating new eclipse project using APIs getting error when using same workspace
creating new eclipse project using APIs getting error when using same workspace [message #876523] Thu, 24 May 2012 19:16 Go to next message
suresh nallamilli is currently offline suresh nallamilli
Messages: 4
Registered: May 2012
Junior Member
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
Re: creating new eclipse project using APIs getting error when using same workspace [message #877440 is a reply to message #876523] Sat, 26 May 2012 18:31 Go to previous message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 1007
Registered: July 2009
Senior Member
interesting question, but not really related to JDT, is it? Smile
Stephan
Previous Topic:New (unexpected) warning with Juno 4.2 RC2
Next Topic:How to create a stateless session bean programatically..
Goto Forum:
  


Current Time: Mon Sep 22 16:34:45 GMT 2014

Powered by FUDForum. Page generated in 0.02017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software