【发布时间】:2015-04-01 21:32:46
【问题描述】:
我正在使用 3.x-4.x 兼容层,并且在我的IPerspectiveFactory.createInitialLayout 方法中有以下配置:
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
// NavigationView
layout.addStandaloneView(NavigationView.VIEW_ID,
true, IPageLayout.LEFT, 0.20f, editorArea);
layout.getViewLayout(NavigationView.VIEW_ID).setCloseable(false);
layout.getViewLayout(NavigationView.VIEW_ID).setMoveable(true);
topRightFolder = layout.createFolder("perspective.toprightfolder", IPageLayout.TOP, 0.25f, editorArea);
topRightFolder.addView("myView");
topRightFolder.addPlaceholder("my.code.*"); //$NON-NLS-1$
所有以my.code.* 开头的视图都将在页面布局的顶部打开,并在选择每个后续视图时堆叠在选项卡中。我的导航视图中还有几个不同的编辑器,当它们打开时,它们位于页面顶部的0.26f,正如预期的那样。
我的问题是:有什么方法可以配置页面布局,让编辑器的行为像视图一样并在IPageLayout 的顶部打开?我注意到当一个编辑器打开时,我可以将它拖到页面布局的顶部,所以我想知道有没有办法让编辑器默认在顶部打开?
【问题讨论】:
标签: eclipse-rcp