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

Bug 466854

Summary: Visual parts are not correctly unregistered when they lose a link to the viewer.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-05-08 11:27:25 EDT
The #unregister() call is guarded within AbstractVisualPart#setParent() so that parts will only ever get unregistered when their parent is set to null and they have no anchoreds. However, a part can lose the link to the viewer, without losing its parent or all anchoreds.
Comment 1 Matthias Wienand CLA 2015-05-08 12:04:46 EDT
I removed the null checks, so that a part is now unregistered when it actually loses the link to the viewer, even if it still has anchoreds. The changes do not affect the current API. The code is published on the master branch, therefore, I resolve this ticket as fixed for 3.10.0RC1.