【问题标题】:How to hide unused placeholders/folders Eclipse RCP/RAP如何隐藏未使用的占位符/文件夹 Eclipse RCP/RAP
【发布时间】:2015-07-23 20:21:39
【问题描述】:

我正在努力只堆叠两个视图,只将它们放在一个窗口中,没有显示其他占位符/文件夹。

我的观点是这样的:

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 应用程序时,我仍然看到底部占位符。如何摆脱它?

【问题讨论】:

    标签: eclipse-rcp perspective eclipse-rap


    【解决方案1】:
    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
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 2018-02-16
      • 1970-01-01
      • 1970-01-01
      • 2013-06-05
      • 1970-01-01
      • 2016-09-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多