Skip to main content


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 nallamilliFriend
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 HerrmannFriend
Messages: 1853
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: Thu Mar 28 11:30:09 GMT 2024

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

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

Back to the top