2014-07-20 44 views
-1

我試圖刪除揮杆基於應用程序的項目,使用「DefaultProjectOperations.performDefaultDeleteOperation」的Netbeans 7.4:試圖刪除項目產生錯誤

,但我不斷收到此錯誤。

唯一的堆棧跟蹤我有如下一個,但現在我的無能什麼可能我是做錯了,或者即使這可能是一個NetBeans缺陷。

我使用NetBeans IDE 7.4。我無法升級到v.8.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) 

回答

2

按照DefaultProjectOperations documentation,拋出異常,因爲ProjectOperations.isDeleteOperationSupported返回false。根據documentation for that method,由於項目沒有實現接口DeleteOperationImplementation,所以返回false。
據我所知,你需要實現該接口來刪除項目。

+0

你好麥克洛文,我會把你的答案作爲接受的答案。如果我碰巧碰到另一面牆,我會在這些論壇上看到兔洞的位置,並寫下另一個問題。感謝您的時間。 – Catersa

+0

不客氣。我希望這是有效的,因爲我無法測試它。 – McLovin