如何设置透视图使左边区域分为两部分:顶部和底部?

时间:2014-03-26 06:20:21

标签: eclipse layout eclipse-rcp eclipse-plugin

尝试了两个Programmatic and Declarative way但失败了,我只想让左边区域如下所示。任何提示?

perspective

2 个答案:

答案 0 :(得分:0)

为左列创建一个文件夹,然后在列中再放两个文件夹:

IFolderLayout leftOuter = layout.createFolder("left.outer", IPageLayout.LEFT, 0.23f, IPageLayout.ID_EDITOR_AREA);

IFolderLayout leftTop = layout.createFolder("left.top", IPageLayout.TOP, 0.5f, "left.outer");

// TODO add views and placeholders to leftTop

IFolderLayout leftBottom = layout.createFolder("left.bottom", IPageLayout.BOTTOM, 0.5f, "left.outer");

// TODO add views and placeholders to leftBotton

答案 1 :(得分:0)

最后,我找到了一种处理此问题的声明方式 (其灵感来自Eclipse内部CVS Repositories Exploring perspective的布局并反编译其源代码)

plugin.xml

<!-- ************** Perspective Extensions START **************** --> <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID="$YOUR_PERSPECTIVE_ID$"> <view closeable="false" id="$BOTTOM_VIEW_ID$" moveable="false" ratio="0.6" relationship="bottom" relative="$TOP_VIEW_ID$" showTitle="true" standalone="true"> </view> </perspectiveExtension> </extension>