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

Bug 506331

Summary: IContentPart, IFeedbackPart, and IHandlePart should be adapted to their viewer
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: 1.0.0   
Target Milestone: 5.0.0 (Oxygen) M4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 509007    

Description Alexander Nyßen CLA 2016-10-21 07:36:06 EDT
Currently, the adaptable-adaptable-bound chain is 'chopped-off' between the root part and the visual parts. That is, the 'main' adaptable hierarchy contains domain, tools, viewers, root parts, and all their subsequent adapters (viewer models, root part policies, etc.), while each visual part roots an own adaptable hierarchy (containing its behaviors and policies). 

Without a continuous adaptable-adapabtable.bound chain, transitive adapter-role bindings (see bug #493523) and transitive adapter scopes (bug #506330) could not be used beyond the root part.

A use case that can currently not be realized is that a certain policy implementation is bound to content parts within a specific viewer only. Another one is scoping of instances beyond the root part in the context of a specific viewer.
Comment 1 Alexander Nyßen CLA 2016-10-22 10:37:47 EDT
As adapter injector does postpone adapter injection until the adaptable chain is complete (see bug #506330), closing the chain will change that adapters are not injected before the parent is set on a part. 

The current content synchronization will not be robust against this and has to be changed, as the anchorage synchronization may not be performed before all parts are linked to their respective parent.
Comment 2 Alexander Nyßen CLA 2016-10-31 17:24:11 EDT
I removed the IBehavior parameter from the operation of the content, feedback, and handle part factories. This way, the synchronization can be migrated from ContentBehavior into a SynchronizationSupport delegate (viewer-bound) that can be used also while being inactive. This way, we can move this responsibility to the root respectively content parts. 

Instead of the parent or root part, it would be best to adapt all parts to their viewer, as this would preserve the current mechanisms while still enabling adaptable scoping.
Comment 3 Matthias Wienand CLA 2016-12-12 11:32:03 EST
We merged branch bug_506331 into master, so the ContentBehavior is now centralized at the root part, and detachment, removal, addition, and attachment are separate phases during content-part-synchronization.
Comment 4 Alexander Nyßen CLA 2016-12-13 07:02:21 EST
I further ensured that all IVisualParts are now adapted to their viewer, so the adaptable chain is properly now properly closed. Changes pushed to origin/master. Resolving as fixed in 5.0.0 (Oxygen) M4 (final contribution).