Netbeans 7.4:试图删除项目产生错误



我试图删除一个基于swing的应用程序中的项目,使用" DefaultProjectOperations.performDefaultDeleteOperation"

但是我一直得到这个错误。

我唯一的堆栈跟踪是以下一个,但现在我无能为力,因为我可能做错了什么,或者即使这可能是netbeans缺陷。

我使用Netbeans 7.4 IDE。我不能升级到v8.0,因为使用这个IDE,它是一个客户端规范。

任何帮助都将是非常感激的。

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)

根据DefaultProjectOperations文档,抛出异常是因为ProjectOperations.isDeleteOperationSupported返回false。根据该方法的文档,返回false是因为项目没有实现DeleteOperationImplementation接口。
据我所知,您需要实现该接口来删除项目。

相关内容

  • 没有找到相关文章

最新更新