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 里了 ,实现了多页编辑器。