如何隐藏未使用的占位符/文件夹Eclipse RCP / RAP

时间:2015-07-16 11:11:45

标签: eclipse-rcp perspective eclipse-rap

我很难只堆叠两个视图,只能在一个窗口中显示它们,而不显示其他占位符/文件夹。

我的观点如下:

public class PerspectiveNew implements IPerspectiveFactory {
  public void createInitialLayout(IPageLayout layout) {
    IFolderLayout folderLayout = layout.createFolder("folder", IPageLayout.TOP, 1.0F, IPageLayout.ID_EDITOR_AREA);
    folderLayout.addView(MyView1.ID);
    folderLayout.addView(MyView2.ID);
  }
}

当我打开我的RCP应用程序时,我仍然看到底部占位符。如何摆脱它?

1 个答案:

答案 0 :(得分:0)

public class PerspectiveNew implements IPerspectiveFactory {
  public void createInitialLayout(IPageLayout layout) {
    IFolderLayout folderLayout = layout.createFolder("folder", IPageLayout.TOP, 1.0F, IPageLayout.ID_EDITOR_AREA);
    folderLayout.addView(MyView1.ID);
    folderLayout.addView(MyView2.ID);
    layout.setEditorAreaVisible(false); // Turn-off visibility of other placeholders/folders
  }
}