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

Bug 512616

Summary: Remove ResizePolicy#getVisualToResize() because it is not respected by IResizableContentPart
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: 1.1.0   
Target Milestone: 5.0.0 (Oxygen) M6   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2017-02-23 05:19:48 EST
The IResizableContentPart interface contains a default implementation for IResizableContentPart#setVisualSize(Dimension), which resizes the part's visual using the visual's Node#resize(double,double) method. Unfortunately, ResizePolicy provides a #getVisualToResize() method that determines the JavaFX Node that should be resized by the policy. However, the ResizeOperation that is constructed by ResizePolicy uses the IResizableContentPart API to resize the part's visual. Therefore, the #getVisualToResize() is not respected when resizing the part's visual using the default #setVisualSize(Dimension) implementation. Consequently, the ResizePolicy#getVisualToResize() method should be removed to encourage designing the visuals to be resizable.
Comment 1 Matthias Wienand CLA 2017-02-27 04:45:46 EST
I removed the ResizePolicy#getVisualToResize() method. The part's visual is used instead. The code is published on the master branch, therefore, I resolve this ticket as fixed for 5.0.0 M6.