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

Bug 333496

Summary: Rendering engine only shows one part for a window with two parts
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: pwebster
Version: 4.1   
Target Milestone: 4.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test Application.e4xmi
none
Make the SashLayout handling local to the SashRenderer
none
Handle shared PSC's none

Description Remy Suen CLA 2011-01-04 11:38:25 EST
Created attachment 186023 [details]
Test Application.e4xmi

Please override your local contacts demo's Application.e4xmi file with the one attached to this bug. When you launch you will see only one part despite the fact that the parent window has _two_ children. The workaround is to wrap the two children in an MPartSashContainer.
Comment 1 Eric Moffatt CLA 2011-01-05 13:59:03 EST
This was almost certainly introduced during the implementation for Bug 317849.

Here we replaced the shell's client area's existing layout (FillLayout) with a SashLayout, meaning that multiple children not in a sash container will no longer get 'tiled'.

The current implementation is suspect in that it ties the various renderers (Perspective, Window, Area) to a particular Sash rendering mechanism and should likely be replaced by one that creates a specific Composite for the top level sash container (with a SashLayout) and then reverting the changes to the layout of the other renderers (i.e. they'd go back to FillLayout, fixing this defect).
Comment 2 Eric Moffatt CLA 2011-01-06 09:46:38 EST
Created attachment 186170 [details]
Make the SashLayout handling local to the SashRenderer


This implements the suggestions outlined in the comment above...
Comment 3 Eric Moffatt CLA 2011-01-06 09:55:39 EST
Committed in >20110106. Applied the patch.
Comment 4 Remy Suen CLA 2011-01-06 10:13:13 EST
(In reply to comment #2)
> Created attachment 186170 [details]
> Make the SashLayout handling local to the SashRenderer

PartRenderingEngineTests's testBug317849() now dies with an NPE.
Comment 5 Eric Moffatt CLA 2011-07-19 10:46:55 EDT
Created attachment 199906 [details]
Handle shared PSC's


The renderer wasn't handling the scenario where it was a shared element (i.e. 'getParent() == null').

Also updated the test to add the shared PSC to its window's 'sharedParts' list...
Comment 6 Remy Suen CLA 2011-07-19 13:36:54 EDT
*** Bug 333869 has been marked as a duplicate of this bug. ***
Comment 7 Eric Moffatt CLA 2011-07-19 14:42:31 EDT
Committed in >20110619. Applied the patch.