Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-core-dev] Trying to move a project

Hi,
 
I am working on a plugin.
In the plugin I am trying to move the project to a new destination.
 
I use the following code:
 

IWorkspace w=ResourcesPlugin.getWorkspace();

IProject projHandle = w.getRoot().getProject(project.getName());

 

IProjectDescription desc=w.newProjectDescription(projHandle.getName());

//I set a new location for path.

desc.setLocation(new Path(getLocation().getLocation()));

try {

projHandle.move(desc,true,monitor);

} catch (CoreException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

 

I get the following error in the console:

 

org.eclipse.core.internal.resources.ResourceException: Problems encountered while moving resources.

at org.eclipse.core.internal.resources.Project.move(Project.java:925)

at org.eclipse.core.internal.resources.Project.move(Project.java:884)

at net.sourceforge.eclipseccase.ui.wizard.share.SharingWizard$3.run(SharingWizard.java:237)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Contains: Resource already exists on disk: 'C:\Users\mike\tmp'.

 

Any ideas what's wrong?

I am out of ideas...

 

//mike

 


Back to the top