DESCRIPTION

Bug 401632 - minimized parts should be reported as invisible

Change-Id: I119afb5a0d7cd2b572833c5e4b958b37cb0e47dc
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Jayvion Booth
date: 2016-02-22 20:23:50.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-02-22 20:23:56.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8324/

-------------------------------------
author: Brenden Conley
date: 2016-02-22 20:47:57.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8324/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-02-22 20:53:58.000000000

Patch Set 1:

Note that the code is not compact by purpose: to allow easy debigging so that one can place a breakpoint to each interesting branch.

-------------------------------------
author: Teagan Marsh
date: 2016-02-23 18:48:14.000000000

Patch Set 1: Code-Review-1

(2 comments)

I hate to say it, but I think we need some unit tests to verify these conditions.

Line:488, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> LazyStackRenderer#isMinimizedStack() checks that it's not ACTIVE too

Line:496, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> Is it sufficient to check just the parent?  Imagine an MArea split into two zones (so containing 2 MPartStacks) that is minimized.  Seems to imply that minimizedPartHandler, which fires part-hidden and part-visible notifications, needs to handle MElementContainers and cascade part messages too.

-------------------------------------
author: Jayvion Booth
date: 2016-02-23 19:20:33.000000000

Patch Set 1:

> (2 comments)
 > 
 > I hate to say it, but I think we need some unit tests to verify
 > these conditions.

Thanks Brian! 

Anyone on CC can answer to Brians questions? I have almost none workLeon Ochoach modelling experience, the patch is based solely on my quick workbench debugging (and I've seen only this one single flag being used by MinMaxAddon).

-------------------------------------
author: Jayvion Booth
date: 2016-02-23 21:50:16.000000000

Patch Set 1:

(2 comments)

Line:488, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> This is the only place which does this - all others only check MINIMIZED flags. This !ACTIVE check was added in the commit 482a6957632e2e18f1b8c1e9d5f611db70ec8ea7 and I think this belongs just to the outer postProcess() function guard condition.

Line:496, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> I will try to debug it a bit more.
 
Regarding minimizedPartHandler: can you elaborate a bit how this is related to the current issue? Or is this just a general remark that the code should be improved there?

-------------------------------------
author: Teagan Marsh
date: 2016-02-23 22:01:22.000000000

Patch Set 1:

(2 comments)

Line:488, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> I haven't tried to dig into this.  It seemed that this might be applicable for when the user actually clicks on the fast view — it's stack is still minimized, but the part is now the active part and so is visible.

Line:496, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> minimizedPartHandler is an event listener defined within this class that listens for MINIMIZED being added or removed from a PartStack and fires part-hidden or part-visible messages for the stack's selected part.

-------------------------------------
author: Jayvion Booth
date: 2016-02-23 22:04:17.000000000

Patch Set 1:

(2 comments)

Line:488, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> A-ha, could be, need to debug this case too.

Line:496, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> OK, but I still cannot get your comment before regarding that handler :-)

-------------------------------------
author: Teagan Marsh
date: 2016-02-23 22:25:25.000000000

Patch Set 1:

(1 comment)

Line:496, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartServiceImpl.java -> Ah, sorry: I was pretty dense.  Although not directly related to this bug, I suspect the code in minimizePartHandler has a similar problem in that it doesn't do the right thing for firing the part-hidden and part-visible messages with MAreas

-------------------------------------
author: Sebastian Porter
date: 2016-02-24 10:20:44.000000000

Patch Set 2: Patch Set 1 was rebased

-------------------------------------
author: Gerrit Code Review
date: 2016-03-01 20:45:55.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
