IEditorInput input = DiagramEditorInput.getInstance();
DiagramEditor editor = (DiagramEditor) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().findEditor(input);前提是editor调用了 open
本文介绍了一种方法来获取DiagramEditor的实例,通过使用特定的IEditorInput实现——DiagramEditorInput,该方法首先创建输入对象,然后利用PlatformUI从当前活动工作台窗口中找到与该输入关联的DiagramEditor。
IEditorInput input = DiagramEditorInput.getInstance();
DiagramEditor editor = (DiagramEditor) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().findEditor(input);
2565

被折叠的 条评论
为什么被折叠?
