3

I have a simple perspective without the editor area:

public class MainPerspective implements IPerspectiveFactory {

@Override
public void createInitialLayout(IPageLayout layout) {
    layout.setEditorAreaVisible(false);
}
}

Now I open an editor:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, "org.acme.project");

In E3, this made the application show the editor area (because how else would I see the newly opened editor part). In E4 (or E3 compatibility) nothing of the sort happens.

The API to open the editor area manually is IWorkbenchPage#setEditorAreaVisible(true), but it does not work for me. Maybe because the intro screen is still open when I want to open the editor? It should not matter either way.

There is a bug report for someting like this, but it was allegedly fixed 4 years ago, in Eclipse 4.2.

So how do I show the editor area in E4?

Stefan S.
  • 3,950
  • 5
  • 25
  • 77
  • I don't think in e4 there is any distinction between editor or part. Please check out http://www.vogella.com/tutorials/Eclipse4Services/article.html#implementing-editor-like-behavior – Shashwat Feb 07 '18 at 07:11
  • @Shashwat Doesn't really matter. I wouldn't want to open views (or parts) in an invisible part of the application either. – Stefan S. Feb 07 '18 at 07:40

0 Answers0