2、chPage提供的接口】1 public interface IWorkbenchPage extends IPartService,ISelectionService,ICompatibleWorkbenchPage{2 3 public IEditorPartopenEdito(IEditorInputinput,StringeditorId)throws PartInitException;4 5 public IEditorPartopenEdito(IEditorI
3、nputinput,StringeditorId, boolean activate) throws PartInitException;6 7 public IEditorPartopenEditor(final IEditorInputinput, final StringeditorId, final boolean activate, final int matchFlags)throws PartInitException;8 } 那到这边,可能
7、需要用户准备两样东西:一是创建IEditorInput实例,二是指定editorid。有些用户可能不想干这两件事情,所以在工具类org.eclipse.ui.ide.IDE中提供了其他的接口:1 public static IEditorPartopenEditor(IWorkbenchPagepage,IFileinput) throws PartInitException{}2 3 public static IEditorPartopenEditor(IWorkbenchPagepage,IFileinpu
8、t, boolean activate) throws PartInitException{ }4 5 public static IEditorPartopenEditor(IWorkbenchPagepage,IFileinput, boolean activate, boolean determineContentType){}6 7 public static