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

Bug 369229

Summary: SashLayout sets widgets on an MPSC eagerly which will cause child elements to not be rendered
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt
Version: 4.2   
Target Milestone: 4.2 M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 320749    
Attachments:
Description Flags
PartRenderingEngineTests patch v1 none

Description Remy Suen CLA 2012-01-20 08:54:24 EST
SashLayout will inspect its children and set a Rectangle instance in them if they are an MGenericTile. The issue here is that the rendering engine an element's widget to determine whether it needs to be processed or not. If a widget is prematurely set on a parent MPSC, then any child model elements of the MPSC will simply be skipped by the rendering engine.
Comment 1 Remy Suen CLA 2012-01-20 08:58:09 EST
Created attachment 209821 [details]
PartRenderingEngineTests patch v1

This unit test will illustrate the problem.
Comment 2 Eric Moffatt CLA 2012-01-20 10:09:57 EST
I just read the IRC thread...it's most certainly an error for the 'widget' to be set by anything except a rendering operation...

In this case the SashLayout is breaking this rule; it should be *modifying* the existing rectangle (if any). The only issue that might arise out of this change would be if there were an 'early' layout which was not followed by another one after the rendering was complete...

I'll make that change and test using Remy's testcase.
Comment 3 Eric Moffatt CLA 2012-01-20 10:34:13 EST
Pushed in >20120120.

commit 185a1abc3f5f676b9b0919f56bbab08d23369cf9

This commit also includes the tests, thanks Remy !
Comment 4 Eric Moffatt CLA 2012-01-20 10:35:21 EST
I'll mark this as FIXED. Brian, could you check to ensure that this fix also includes your scenario ? Re-open if there are issues...
Comment 5 Eric Moffatt CLA 2012-01-24 13:42:26 EST
Verified in I20120123-2200.