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

Bug 439767

Summary: Ensure anchored rather anchorage is responsible of establishing/unestablishing the anchorage-anchored relationship
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-07-17 05:11:50 EDT
Up to now an anchorage IVisualPart is responsible of establishing/unestablishing a relationship to an anchored IVisualPart. According to this, synchronization within IContentPart (ContentBehavior) synchronizes content anchoreds against part anchoreds. 

This is not so nice for connections, where synchronization could be driven more easily from the connection (providing source and target nodes) rather than from the source and target nodes respectively. 

We should thus change this responsibility to be rather driven from the anchored, so that IContentPart synchronization would rather depend on synchronizing the content anchorages against the part anchorages. 

Even where not synchronized automatically (for handle and feedback parts), it would be more appropriate to remove this responsibility of maintaining the relationship from the anchorage (and give it to the feedback and handle parts instead).

This would also enable us to cleanup the IVisualPart interface by removing the attachToAnchorageVisual()/detachFromAnchorageVisual() callbacks and rather handle these cases directly within AbstractVisualPart, similar to as done for adding/removing child visuals.

As a result, a parent-child relationship would be driven by the parent, whereas an anchorage-anchored relationship would rather be driven by the anchored.
Comment 1 Alexander Nyßen CLA 2014-07-17 05:16:41 EDT
Changed the contract of IVisualPart and IContentPart accordingly. Adopted the MVC.FX example as well as Zest.FX. Pushed all changes to origin/master.