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

Bug 517646

Summary: RadialLayoutAlgorithm alters the layout bounds property.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF LayoutAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.1.0   
Target Milestone: 5.0.0 (Oxygen) RC4   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2017-06-01 10:15:11 EDT
Currently, RadialLayoutAlgorithm queries the layout bounds property for the graph of which the entities are subject to layout, and alters these bounds in-place, i.e. the property value is not copied, but its fields are changed.

This leads to strange behavior within Zest where the bounds are treated like an input parameter for the layout algorithm, i.e. it is expected that the algorithm does not change the bounds in-place.

Therefore, the RadialLayoutAlgorithm should copy the bounds and alter the copy. Moreover, for respecting the insets, the Rectangle#shrink(double,double) or #getShrinked(double,double) method can be used instead of manually setting location and size.
Comment 1 Matthias Wienand CLA 2017-06-09 09:32:58 EDT
I ensured that the bounds are copied before manipulation. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 5.0.0 RC4. However, the cosmetic changes w.r.t. shrink() and getShrinked() are not part of this fix, because we should avoid non-critical changes for RC4.