| Summary: | Shared parts needs to deactivate themselves from their parent context when they are hidden | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||||||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||||||||
| Severity: | major | ||||||||||||
| Priority: | P3 | CC: | ob1.eclipse, pwebster | ||||||||||
| Version: | 1.0 | ||||||||||||
| Target Milestone: | 4.1 M5 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Remy Suen
The 'Debug' perspective has an active child context, okay, that's kind of weird maybe. But what's weirder is that said child context's getParent() returns null. (In reply to comment #1) > The 'Debug' perspective has an active child context, okay, that's kind of weird > maybe. The active child in question is the 'Outline' view's context. This is why step 2 is so important for reproducing this bug. When the 'Outline' view is hidden in the 'Debug' perspective, its context gets reparented under the 'Java' perspective. However, the 'Debug' perspective still thinks it has an active child (the 'Outline' view). This is why it has an active child even though it has no parts up and why said active child's getParent() returns null (because it was finally disposed when the 'Java' perspective was closed, as there were no perspectives open showing the 'Outline' view). Created attachment 184852 [details]
ElementReferenceRenderer patch v1
When a placeholder is being hidden and its referenced element's context is being reparented, we should deactivate the context before the reparenting operation if we are currently the active child of our original parent.
Created attachment 186047 [details]
Illustrative patch for EclipseContext - not meant to be applied
On a surface this seems like something that could be fixed in the eclipse context, but such change causes 6 JUnits to fail, including the new JUnit in this bug.
Created attachment 186087 [details]
ElementReferenceRenderer patch v2
Slight change for an additional assert statement and copyright header updates.
Thinking about the issue some more I don't think we should arbitrarily deactivate contexts just because the parent has changed as we would then be "randomly" changing the active part of hidden perspectives.
(In reply to comment #5) > Created attachment 186087 [details] > ElementReferenceRenderer patch v2 Patch released to CVS HEAD. Created attachment 186164 [details]
EPartService patch v3
(In reply to comment #7) > Created attachment 186164 [details] > EPartService patch v3 Released to HEAD so that the EPS will automatically handle these cases to make life slightly easier for the renderers. Verified with I20110125-2200 on Windows XP. |