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

Bug 333489

Summary: PartSashContainers prevent re-rendering a previously-opened window
Product: [Eclipse Project] e4 Reporter: Brian de Alwis <bsd>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact: Eric Moffatt <emoffatt>
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: 4.1 M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch that cleans up the 'widget' and 'renderer' fields of sashes none

Description Brian de Alwis CLA 2011-01-04 11:03:53 EST
BuildId: e4 4.1M4

Attempting to re-open a window with a PartSashContainer fails as the contents of the PartSashContainers are not re-created.

The direct problem is that the PartSashContainer elements don't have their widget fields nulled out on close.  Thus the widgets are not re-rendered during the IPresentationEngine/PartRenderingEngine.createGui().

The widget field actually contains a Rectangle instance.  The field isn't nulled out as SashRenderer inherits bindWidget from SWTPartRenderer, which only installs the unbindWidget-on-dispose (and thus null the widget field) when the widget actually is a control.
Comment 1 Eric Moffatt CLA 2011-01-04 11:28:06 EST
Good one...I see the problem, patch / fix coming...
Comment 2 Eric Moffatt CLA 2011-01-04 15:33:07 EST
Created attachment 186045 [details]
Patch that cleans up the 'widget' and 'renderer' fields of sashes


A MPSC is always created under some real parent Composite. This patch simply adds a dispose listener to the composite containing the layout that explicitly nulls the fields if the owning composite gets disposed.
Comment 3 Eric Moffatt CLA 2011-01-04 15:57:15 EST
Committed in >20110104. Applied the patch.
Comment 4 Brian de Alwis CLA 2011-01-06 11:17:36 EST
Verified fix.  Thanks Eric.
Comment 5 Eric Moffatt CLA 2011-01-07 09:56:07 EST
Np, thanks for the work you're putting in...
Comment 6 Eric Moffatt CLA 2011-01-07 09:56:27 EST
Marking as FIXED.