在開發Eclipse插件,調試運行插件時大家可能會遇到這樣的問題:
"Unable to create this part due to an internal error. Reason for the?failure: The editor class could not be instantiated. This usually?indicates that the editor's class name was mistyped in plugin.xml."
我在開發是出現這種問題主要是因為重新建立了一個新的插件項目,項目名稱與原來刪除的項目名稱相同導致。
具體解決辦法如下:
1、找到運行插件項目的workspace(注意:不是你開發插件運行的Eclipse的workspace),一般目錄名稱為“runtime-EclipseApplication”。
2、找到后進入目錄“.metadata\.plugins”察看是否有你要運行的插件的名稱,如“XXX”,把這個目錄刪除即可,簡單方法是把“.metadata\.plugins”中的全部目錄刪除。
3、再執行插件項目,OK了:)