我有一个没有编辑区的简单视角:
public class MainPerspective implements IPerspectiveFactory {
@Override
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
}
}
现在我打开一个编辑:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, "org.acme.project");
在E3中,这使得应用程序显示了编辑器区域(因为我还能看到新打开的编辑器部分)。在E4(或E3兼容性)中,没有任何类型的事情发生。
手动打开编辑器区域的API是IWorkbenchPage#setEditorAreaVisible(true)
,但它对我不起作用。也许是因为当我想打开编辑器时,介绍屏幕仍然打开?这两种方式无关紧要。
有一个bug report这样的人,但它据说在4年前修复,在Eclipse 4.2中。
那么如何在E4中显示编辑区?