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

Bug 461743

Summary: The LayoutModel should implement LayoutContext.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF ZestAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M6   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-03-09 13:08:31 EDT
Currently, the LayoutModel maintains a mapping from Graph to LayoutContext, i.e. it assigns a LayoutContext to each Graph. This allows to easily change the context, which in reality overrides any changes made by the user to the context, which is undesired. Moreover, the LayoutModel does not maintain any properties except the LayoutContext, adding one layer of indirection when accessing a LacoutContext.
Comment 1 Matthias Wienand CLA 2015-03-13 11:52:20 EDT
I refactored the code so that LayoutModel extends GraphLayoutContext and it is bound as an adapter for every GraphContentPart. Moreover, I changed the mechanism for providing layout information as follows: The AbstractLayoutBehavior schedules Runnables before and after a layout algorithm is applied. The NodeLayoutBehavior provides its layout information before applying an algorithm and adapts to the layout data after applying an algorithm.

The code is published on the master branch, therefore I resolve this ticket as fixed for 3.10.0M6.