Bug 166501 - [Perspectives] Need to be able to edit perspectives before opening them
Summary: [Perspectives] Need to be able to edit perspectives before opening them
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-12-01 11:10 EST by Adam Crume CLA
Modified: 2019-09-06 15:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Crume CLA 2006-12-01 11:10:16 EST
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.
Comment 1 Tod Creasey CLA 2006-12-04 09:51:07 EST
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?
Comment 2 Adam Crume CLA 2006-12-04 09:55:00 EST
I was expecting something like a callback, but it wouldn't have to be done that way.
Comment 3 Paul Webster CLA 2006-12-04 20:05:40 EST
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
Comment 4 Adam Crume CLA 2006-12-05 09:33:12 EST
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.)
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:33:18 EDT
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.