This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 414999 - After making editor area not visible closed view stacks don't re-open
Summary: After making editor area not visible closed view stacks don't re-open
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4 M2   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-13 12:51 EDT by Steven Horsman CLA
Modified: 2013-09-16 11:27 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Horsman CLA 2013-08-13 12:51:21 EDT
Using the resource perspective:

Make the editor area not visible by the following code:

IWorkbenchPage page = window.getActivePage();
IEditorReference[] editorRefs = page.getEditorReferences();
if (editorRefs == null || editorRefs.length == 0) {
	page.setEditorAreaVisible(false);
}

The view stack for Tasks/Problems should take up the whole right of the perspective now.

Close both these views and the Project Explorer and Outlines views should stretch across the whole perspecitve.

Now re-open a view from the closed stack (eg Problems, or Console)
The view stack fails to re-open.
Comment 1 Eric Moffatt CLA 2013-08-13 15:12:31 EDT
Steven, I can repro this now...first news is that it has something to do with the fact that the view stack is in a sash container that also contains the editor area...if you try the same experiment with the other views on the left they work ok.
Comment 2 Eric Moffatt CLA 2013-08-13 16:16:45 EDT
I'm getting there...there is a particular (and peculiar) piece of code in the CleanupAddon that screws with the 'visible' state and no corresponding reversal.

It's this asymmetry that is causing the problems...
Comment 3 Eric Moffatt CLA 2013-08-14 10:19:09 EDT
OK, I think I have a fix; I've put the patch on Gerrit

https://git.eclipse.org/r/15471

I can't think of any existing situations where this new code would inadvertently set visible == true when it should be false but I'm going to take the plunge and commit this into 4.4 so it should be available in nightly builds after this date...once we've used it enough to be confident that there are no regressions then we can look at back porting it.

If you're in a spot where you could try this change out in your environment and report back that would be great.
Comment 5 Eric Moffatt CLA 2013-09-13 13:18:43 EDT
Looks like I forgot to mark this FIXED after the commit...
Comment 6 Eric Moffatt CLA 2013-09-16 11:27:41 EDT
Verified in 4.4.0.I20130915-2000.