Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 419086

Summary: [ViewMgmt] Grey windows and Bad layouts
Product: [Eclipse Project] Platform Reporter: Ed Willink <ed>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact: Eric Moffatt <emoffatt>
Severity: normal    
Priority: P3 CC: daniel_megert, emoffatt, tom.schindl
Version: 4.3   
Target Milestone: 4.4 M6   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Example bad layout
none
A grey Console View none

Description Ed Willink CLA 2013-10-09 17:11:29 EDT
M2: I'm seeing quite a few windows that go grey, where M1 didn't (although I recall similar phenomena before Kepler). e.g. Type Hierarchy, Console, JUnit

The grey windows stay grey after switching windows but generally restore after switching perspectives.

I'm also seeing windows that have different shapes in different perspectives fail to switch to the shaping for the current perspective. Particular common but not reproducible when JUnit is in both Debug and Java perspectives. This too seems like a regression to pre-Kepler.

I presume that trimming erroneous activations is also trimming required re-layouts.
Comment 1 Wojciech Sudol CLA 2013-10-10 08:02:13 EDT
Could you attach a screenshot that presents such grey windows?
Comment 2 Paul Webster CLA 2013-10-10 08:22:53 EDT
This is related to the work Eric did on Bug 416650

I see this sometimes as well on linux

PW
Comment 3 Ed Willink CLA 2013-10-10 08:26:46 EDT
Created attachment 236328 [details]
Example bad layout

Attached shows more interesting features.

Specifically the Variables View is shown in the Java perspective sized to fit its usage in the Debug perspective.

More oddly, why is the Variables View, Debug and Breakpoints in the Java perspective at all?

NB this is a Workspace that has evolved from Kepler and advanced and retarded a few times as bad evolution has been retyracted.
Comment 4 Thomas Schindl CLA 2013-10-10 08:32:18 EDT
looks like a reparenting needs to trigger a layout-pass
Comment 5 Dani Megert CLA 2013-10-10 08:59:06 EDT
This should get fixed for M3, hopefully via bug 416650.
Comment 6 Ed Willink CLA 2013-10-10 12:11:39 EDT
(In reply to Thomas Schindl from comment #4)
> looks like a reparenting needs to trigger a layout-pass

No. It's not reproducible.

Looks like you need to solve a concurrency issue and maybe many other funnies will suddenly be cured too.
Comment 7 Ed Willink CLA 2013-10-10 12:25:19 EDT
(In reply to Thomas Schindl from comment #4)
> looks like a reparenting needs to trigger a layout-pass

In the case of JUnit, I may have a vertical orientation for one perspective and a horizontal for another. The View is therefore not shared between perspectives; just the displayed information content.
Comment 8 Ed Willink CLA 2013-10-10 12:55:08 EDT
Created attachment 236345 [details]
A grey Console View

The grey Console View remained grey after one change of perspective, but recovered after a second.
Comment 9 Eric Moffatt CLA 2013-10-10 15:57:37 EDT
Ed, I suspect that you actually are sharing the JUnit view. IIRC the horizontal / vertical alignment is based on the view's area isn't it.

Is this just a Linux issue ? I saw one version of this on Windows which I fixed, perhaps there's another one specific for Linux?

Paul, chan you show me this when you come back ?
Comment 10 Ed Willink CLA 2013-10-10 16:22:50 EDT
(In reply to Eric Moffatt from comment #9)
> Ed, I suspect that you actually are sharing the JUnit view. IIRC the
> horizontal / vertical alignment is based on the view's area isn't it.

I mentioned JUnit hori/vertyical to make a design point.

In MVC parlance, the JUnit results are M and shared. The V is distinct for eaxch perspective. The C can be shared too.

I just tried switching a JUnit from H to V in one perspective and indeed another perspective changed too, despite being a very bad fit. Do you want another bug for this?
Comment 11 Eric Moffatt CLA 2013-10-28 15:24:30 EDT
Ed, just tried the scenario in your last comment and on my Win7 box I get the expected result. I had the JUnit view open in two perspectives in stacks where it was vertical in one and horizontal in the other. Switching perspectives always picks the alignment that matches the JUnit's aspect ratio.

This is the expected behavior, not a defect. Also, it's the JUnit view's implementation that catches its size change events and resets the orientation not the platform.

BTW, are there any of the artifacts you talk about still reproducible ? If not then we should look at closing this bug out. If it's a Linux issue I'll talk to Paul and we'll take a look.
Comment 12 Ed Willink CLA 2013-10-29 00:56:00 EDT
JUnit has three modes; horizontal/vertical/auto. These problems are nothing to do with JUnit's auto mode.

Perhaps we need a separate bug that setting JUnit vertical in one perspective conflicts with setting it horizontal in a nother.

This bug is a very simple problem that occurs on many views that when changing perspective; the view in one perspective retains the layout of a previous perspective and sometimes gets a 'grey' window layout.
Comment 13 Dani Megert CLA 2013-10-29 04:22:52 EDT
See also bug 420126 which fixed at least one scenario.
Comment 14 Eric Moffatt CLA 2013-11-06 09:59:41 EST
Ed, if you're on Linux then the mis-orientation of the JUnit view is likely caused by a failure to correctly size the part to its container in the newly showing perspective. Does a resize (i.e. dragging the sash or sizing the window) restore everything to its correct state ?
Comment 15 Ed Willink CLA 2013-11-06 10:12:55 EST
(In reply to Eric Moffatt from comment #14)
> Ed, if you're on Linux

I'm on Windows Vista
Comment 16 Eric Moffatt CLA 2013-12-10 15:37:54 EST
M4 is done...
Comment 17 Ed Willink CLA 2013-12-10 16:14:50 EST
Any chance of some priority on this regression?

I'm getting really fed up wuith having to do spurious perspective changes to get JUnit/Console/GIT Staging windows laid out credibly.
Comment 18 Ed Willink CLA 2014-01-23 16:43:58 EST
(In reply to Ed Willink from comment #17)
> I'm getting really fed up wuith having to do spurious perspective changes to
> get JUnit/Console/GIT Staging windows laid out credibly.

Much easier workaround is to fractionally resize any view.
Comment 19 Eric Moffatt CLA 2014-02-04 10:38:26 EST
Unless someone can attach steps to reliably reproduce this effect I'm going to have to close this defect as 'Yeti Sighting'...

Paul, I've seen a layout issue on Linux...do you know how to reproduce it ?
Comment 20 Ed Willink CLA 2014-02-04 11:48:59 EST
(In reply to Eric Moffatt from comment #19)
> Unless someone can attach steps to reliably reproduce this effect I'm going
> to have to close this defect as 'Yeti Sighting'...
> 
> Paul, I've seen a layout issue on Linux...do you know how to reproduce it ?

Firstly ignore all comments about JUnit View above; they seem to cause confusion.

Basically I get a mal-laid out view on perhaps 1 in 20 changes of view/perspective (not editor). Certainly involves my favourite views; Console, Git Staging, Type Hierarchy.

The problem is almost ceratinly aggarvated by the re-use of views in more than one perspective, so what I often see is a view 'sensibly' laid out for the bounds in another perspective.
Comment 21 Eric Moffatt CLA 2014-02-05 14:14:21 EST
The sizing issues have been fixed against another defect...

*** This bug has been marked as a duplicate of bug 426013 ***