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

Bug 356124

Summary: [Compatibility] View is not displayed if added relative to a placeholder view
Product: [Eclipse Project] Platform Reporter: Sarah <sarah.brake>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.1   
Target Milestone: 4.2 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Sarah CLA 2011-08-29 17:58:53 EDT
Build Identifier: I20110620-1631

If a perspective layout is designed such that the first view added to the IPageLayout is added using layout.addPlaceholder(...), when the perspective is displayed the perspective appears empty.  If additional views are then added to the perspective, the views display as expected.  

Stepping through the perspective container hierarchy, it looks like the base PartSashContainer is not getting the toBeRendered flag set to true, although lower level PartSash/PartStacks do have the correct toBeRendered values.

Reproducible: Always

Steps to Reproduce:
1. Create an IPerspectiveFactory with the following createInitialLayout:
public void createInitialLayout(final IPageLayout layout) {
        final String editorArea = layout.getEditorArea();
        layout.setEditorAreaVisible(false);
        layout.addPlaceholder(<HiddenView>.ID, IPageLayout.BOTTOM, 0.5f, editorArea);
        layout.addView(<VisibleView>.ID, IPageLayout.RIGHT, 0.5f, <HiddenView>.ID);
}

2. Open the created perspective and no views will display.
Comment 1 Remy Suen CLA 2011-08-29 18:20:33 EDT
Hi Sarah, is this bug related to bug 350082?
Comment 2 Sarah CLA 2011-08-29 20:05:14 EDT
(In reply to comment #1)
> Hi Sarah, is this bug related to bug 350082?

This is similar to that bug, but this perspective doesn't have any folder layouts.  I think the fix would be similar to what was done in the ModeledFolderLayout, just for Placeholder views.
Comment 3 Remy Suen CLA 2011-08-30 09:32:37 EDT
Fix pushed to R4_development.
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=57fb15d4eb534df186fd0b930c81cdc5c3137adf

Thank you for bringing this bug to our attention, Sarah!
Comment 4 Sarah CLA 2011-08-30 10:42:13 EDT
(In reply to comment #3)
> Fix pushed to R4_development.
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=57fb15d4eb534df186fd0b930c81cdc5c3137adf
> 
> Thank you for bringing this bug to our attention, Sarah!

Thanks!  This worked for me.
Comment 5 Remy Suen CLA 2011-09-13 12:02:53 EDT
Verified with I20110913-0200 on Windows XP.

Thanks again for the bug report, Sarah.