Community
Participate
Working Groups
The Eclipse Libra project has a logic that removes the Plug-in Nature from a project (see bug 343878). According to the guidelines given in the Javadoc, we remove the nature from the IProjectDescription and the call IProject.setDescription() with the modified IProjectDescription. It looks like the Project.setDescription() implementation does not call IPluginNature.deconfigure() properly, because after it is executed the plug-in nature is gone, but the two plug-in builders (SchemaBuilder and ManifestBuilder) are still there. I've tried to debug and I see that the PluginProject.deconfigure() is actually called, but this does not affect the final IProjectDescription that is set in Project.setDescription(). I will attach a simple test case that demonstrates the bug. We can work around this bug by explicitly removing the two builders from the IProjectDescription, but this is not a good solution, because we are duplicating the functionality of PluginProject.deconfigure().
Created attachment 194727 [details] Test case Test case attached.
I can reproduce this using the test case. This is not Platform/Resources issue. The root cause is that the changed description is not stored using IProject#setDescription call inside org.eclipse.pde.internal.core.natures.BaseProject.removeFromBuildSpec(String). Similar thing is already done in BaseProject.setBuilderCommand(IProjectDescription, ICommand) Moving to PDE/UI.
Created attachment 213506 [details] Patch
Fix applied to master. Thanks!