We would like to reset a perspective programmatically in an Eclipse RCP 4 application. I've been looking at examples for how this can be done but it seems that there isn't a tidy method of doing so.
Here are a few examples we've looked at:
1 https://www.eclipse.org/forums/index.php/t/210165/
Copying all perspectives into Snippets
. This means maintaining the duplicates in the Perspective Stack
and Snippets
which is not suitable for a large RCP application.
2 How to reset perspective programmaticly in Eclipse RCP E4 not E3
Calling resetPerspectiveModel
. This doesn't appear to do anything. Another user has commented mentioning this too.
3 How do I reset perspective for Eclipse e4 RCP application?
The first answer mentions using RCP 3 code.
The second answer removes the current perspective, adds it, then calls to switch to the current perspective. This does nothing.
We've been trying variations of each of these methods and we can't get it to reset.
What is the correct way of resetting perspectives in a pure e4 application?