多页编辑

来源:互联网 发布:知其不可为而为之者 编辑:程序博客网 时间:2024/06/03 20:20

protected void createPages() {

try {

 

this.addPage(0, new GefEditor(), this.getEditorInput());

this.setPageText(0, "图形");

this.addPage(1, new SourceEditor(), this.getEditorInput());

this.setPageText(1, "源码");

} catch (PartInitException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

 

}

 

这样就可以把多个编辑器放在  MultiPageEditorPart 里了 ,实现了多页编辑器。