eclipseeclipse-rcp

Preventing views from closing when all are detached


I have a simple RCP application and the Application Model looks like this:

Application Model

This works fine. The application runs and shows all areas and views defined.

It looks like this: Application

But when I detach all views from the current perspective, all of them are closed immediately when I detach the last view that was attached to the main window.

It seems that when all the views are detached, the perspective is closed to.

Is this the expected behavior?

If so, how can I prevent all views from closing on this situation?


Solution

  • Adding NoAutoCollapse to the tags for the Perspective in the application model should prevent it from being hidden (collapsed). Note that tags are case sensitive.

    A lot (but not all) of the tags that can be used are defined in the org.eclipse.e4.ui.workbench.IPresentationEngine interface.