嘟嘟

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  26 Posts :: 0 Stories :: 6 Comments :: 0 Trackbacks
org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID 错误
Eclipse3.2M6以后,Editor在plugin.xml里注册时,必须带icon参数
<extension
         id="gef.tutorial.step.ui.DiagramEditor">
      <editor
         id="gef.tutorial.step.ui.DiagramEditor"
         name="Diagram Editor"
         icon=""
         class="gef.tutorial.step.ui.DiagramEditor"
         default="false">
      </editor> 
 </extension>

在对应action中得run函数中打开编辑器.
   IEditorInput input = new DiagramEditorInput(new Path(path));
   IWorkbenchPage page = window.getActivePage();
   try {
    page.openEditor(input, DiagramEditor.ID, true);
   } catch (PartInitException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }
posted on 2007-05-09 12:39 fyp1210 阅读(989) 评论(0)  编辑  收藏 所属分类: RCP&SWT&JFACE

只有注册用户登录后才能发表评论。


网站导航: