当前位置: 首页 > 工具软件 > OpenEditor > 使用案例 >

gef Unable to open editor, unknown editor ID 解决方法

督飞羽
2023-12-01
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID: com.example.workflow.ui.WorkflowProcessEditor
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:634)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2817)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

 

这种异常一般是edtior里的ID跟plugin.xml里的ID不一样。。。。。所以只要把他们改成一样的就可以了。比如下面

 

<extension
         point="org.eclipse.ui.editors">
      <editor
            class="com.example.workflow.ui.WorkflowProcessEditor"
            default="true"
            extensions="workflow"
            icon=" "
            id="com.example.workflow.ui.WorkflowProcessEditor"
            name="流程设计器"/>
   </extension>

。。。。。。。。。。。。。。。。。。

 

public class WorkflowProcessEditor extends GraphicalEditorWithFlyoutPalette{

    public static final String ID ="com.example.workflow.ui.WorkflowProcessEditor";

 

 类似资料: