我是RCP的新手,也许问题基本但是: 在两个视图的透视图中,如何在应用程序开头只显示其中一个?
答案 0 :(得分:1)
试试这个
public class Perspective implements IPerspectiveFactory {
/** Top folder's id. */
public static final String FI_TOP = Bootstrap.PLUGIN_ID + ".topFolder";
/** Top folder's id. */
public static final String FI_BOTTOM = Bootstrap.PLUGIN_ID+ ".bottomFolder";
float ratioTop = 0.35f;
float ratioBottom = 0.60f;
private IPageLayout layout;
public void createInitialLayout(IPageLayout layout) {
this.layout = layout;
String editorAreaId = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.createPlaceholderFolder(FI_TOP, IPageLayout.TOP, ratioTop, editorAreaId);
layout.createPlaceholderFolder(FI_BOTTOM, IPageLayout.BOTTOM, ratioBottom, editorAreaId);
//Opnen a view
layout.addView("MyViewId", IPageLayout.TOP, 0.9f, layout.getEditorArea());
}
public IPageLayout getLayout() {
return layout;
}