Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Delete Project Resource is not working in Eclplse2.1
Delete Project Resource is not working in Eclplse2.1 [message #150333] Tue, 28 October 2003 14:18
Eclipse UserFriend
Originally posted by: kunal.nortelnetworks.com

The following code is working under Win2K Eclipse 2.0 but with Eclipse
2.1, the content under the project is partially deleted. As .project is
getting deleted leaving some folders inside, the project can not be
deleted from the context menu in package explorer. The project can only be
deleted manually outside eclipse.

Any help will be appreciated.

// Create a project

IWorkspaceRoot root = MyPlugin.getWorkspace().getRoot();
IProject newProjectHandle = root.getProject("MyProject");
try {
if (newProjectHandle.exists())
newProjectHandle.delete(true, null);
} catch (CoreException e) {
System.out.println(e.getMessage());
}
IProjectDescription description =
root.getWorkspace().newProjectDescription(
newProjectHandle.getName());
try {
newProjectHandle.create(description, null);
newProjectHandle.open(null);
} catch (CoreException e) {
System.out.println(e.getMessage());
}

// add folders, files to this project

// Delete the project

try {
newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE,
null); newProjectHandle.delete(true,true,null);
} catch (CoreException e ) {
System.out.println(e.getMessage());
}
Previous Topic:Problems in Project deletion
Next Topic:Plug-in deployment: icons not found
Goto Forum:
  


Current Time: Mon May 12 02:47:34 EDT 2025

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

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

Back to the top