Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » programatically import project
programatically import project [message #554069] Fri, 20 August 2010 02:59
Renato Novais is currently offline Renato NovaisFriend
Messages: 1
Registered: August 2010
Junior Member
Hi, i'm developing a plugin that import some projects from the hard disk.
I have to import many diferent versions of the same project, so i decided first of all rename the folders
for ex:
project MobileMedia (version 1, 2 and 3) are renamed to
at this point all this project have the same project description name (MobileMedia).

The second step is rename the project description.
In the second step, If these project are outside the workspace, every think works fine, otherwise I receive the following error

E:\projects\java\workspace\runtime-EclipseApplication\tags.V 4.0.Mobile Media overlaps the location of another project: 'tags.V4.0.Mobile Media'

This error only happens if the projects are inside the workspace.

the code i'm using is:

try {

String file = getFolderExport() + "/"
+ getFolderName() + "/.project";

/*the problem happens when getFolderExport() returns the workspace folder*/

IProjectDescription description = ResourcesPlugin.getWorkspace()
.loadProjectDescription(new Path(file));

IProject project = ResourcesPlugin.getWorkspace().getRoot()

if (project.exists())
project.delete(true, null);
project.create(description, IProject.FORCE, null);;
project.move(description, IProject.FORCE, null);
ijproject = JavaCore.create(project);
} catch (CoreException e) {

I appreciate any help!
best regards!!

[Updated on: Fri, 20 August 2010 03:00]

Report message to a moderator

Previous Topic:Q re NewPluginProjectFromTemplateWizard
Next Topic:get back preference page
Goto Forum:

Current Time: Thu Oct 18 18:53:50 GMT 2018

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

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

Back to the top