扩展Eclipse Pespectives时,设置自己Pesptective的布局
开发Eclipse插件或RCP,有时需要扩展eclipse pespective point ,通过实现IPerspectiveFactory建立自己的Perspective。如何对自己的Pespective 布局进行设置?结合前段时间所做应用,我把自己对如何设置Pespective布局的理解记录下来,供自己以后参考,也希望能对大家有所帮助。
为了说起来方便,这里先把我自己实现的createInitialLayout方法贴出来:
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left=layout.createFolder("left", IPageLayout.LEFT, 0.2f, editorArea);
left.addView("org.eclipse.ui.views.ResourceNavigator");
IFolderLayout bottom=layout.createFolder("bottom", IPageLayout.BOTTOM, 0.8f, editorArea);
bottom.addView(“MyView1”);
bottom.addView(“MyView2”);
IFolderLayout right=layout.createFolder("right", IPageLayout.RIGHT, 0.8f, editorArea);
right.addView(&ldq
推荐文章 |

