Q:

Netbeans 7.4 : Trying to delete project produces error

I am trying to delete a project in a swing based application, using " DefaultProjectOperations.performDefaultDeleteOperation"
But i keep getting this error.
The only stacktrace i have is the following one, but right now i am clueless as what could i be doing wrong, or even if this could be a netbeans defect.
I am using Netbeans 7.4 IDE. I cannot upgrade to v.8.0 as using this IDE it is a client specification.
Any help would be greatly appreciated.
java.lang.IllegalArgumentException: Attempt to delete project that does not support deletion.
at org.netbeans.spi.project.ui.support.DefaultProjectOperations.performDefaultDeleteOperation(DefaultProjectOperations.java:85)
at com.elitel5000.plugin.project.ElitelProject$ProyectoActionProvider.invokeAction(ElitelProject.java:219)
at org.netbeans.modules.project.ui.actions.ProjectAction$2.run(ProjectAction.java:186)
at org.openide.util.Mutex.doEvent(Mutex.java:1348)
at org.openide.util.Mutex.writeAccess(Mutex.java:462)
at org.netbeans.modules.project.ui.actions.ProjectAction.runSequentially(ProjectAction.java:183)
at org.netbeans.modules.project.ui.actions.ProjectAction$1$1.run(ProjectAction.java:139)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)

[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

A:

According to the DefaultProjectOperations documentation, the exception is thrown because ProjectOperations.isDeleteOperationSupported returns false. According to the documentation for that method, false is returned because the project does not implement the interface DeleteOperationImplementation.
As far as I can tell, you need to implement that interface to delete the project.

