Community
Participate
Working Groups
I have an RCP app, and I have control over when a perspective is opened, but I need to make sure a couple of views are hidden before opening the perspective. With the current API, this doesn't seem possible.
Please sketch out the sort of thing you would need. Do you want to edit the workbench.xml or some callback before a perspective opens?
I was expecting something like a callback, but it wouldn't have to be done that way.
If you've created the perspective, why not leave the views out. Then programmaticaly show them if there's a need. You can still control their placement in the perspective by adding placeholders instead of the views themselves. If you have a condition that would allow them to open when the perspective is opened, you can either 1) open the perspective and then quickly show the views or 2) add a perspective listener so that when it opens you can show the view. I wonder if we can use org.eclipse.ui.perspectiveExtensions to remove a view from an existing perspective declaratively. This of course wouldn't be useful against already open perspectives. PW
We're basically doing what you suggest in the first paragraph (leave the views out, then display them if needed). The problem is that the perspective is saved when the app is closed, and if the views were visible, they will be initially visible the next time the app is opened. We don't want to disable saving state, because we have other perspectives that we do want the user to be able to save. I tried hiding the views in the createPartControl method for another view, but that created all sorts of bugs. (I'm not at all surprised; it seems like a foolhardy thing to do.)
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.