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

Bug 518073

Summary: Wrong first or last GMF bendpoints in case of Straight routing style with only one segment
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Guillaume Doux <guillaume.doux>
Severity: normal    
Priority: P3 CC: guillaume.doux, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 4.1.6   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/99055
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=38788d1192b4e16af84a9adf2e73bfdfffb6d9b3
Whiteboard: diagram gmf edges
Bug Depends on:    
Bug Blocks: 517437, 518440, 518441, 518870, 518871    
Attachments:
Description Flags
sampleProject.zip for steps to reproduce
none
1-beforeMovingEdge.png
none
2-afterMovingEdge.png none

Description Laurent Redor CLA 2017-06-09 09:41:17 EDT
Created attachment 268844 [details]
sampleProject.zip for steps to reproduce

In case of an edge with a Straight routing style and with only one segment, the GMF bendpoints are false if the edge is "reverted". For example, in the case of "1-beforeMovingEdge.png", the GMF bendpoints are correct (same as draw2d). But if the node C2 is moved on left of C1, the GMF bendpoints are wrong (see "2-afterMovingEdge.png").
These false bendpoints can be problematic for other calculations (like label location).

Steps to reproduce:
* Open the diagram "newDiag3" of the project "SampleProject" (from SampleProject.zip)
* Open the "Sirius Debugging View" (from plugin org.eclipse.sirius.ui.debug)
* Select the edge between C1 and C2
* In the "Sirius Debugging View", the GMF computed points are the same as Draw2D points.
* Move C2 to the left of C1
* KO: In the "Sirius Debugging View", the GMF computed points are not the same as Draw2D points.
Comment 1 Laurent Redor CLA 2017-06-09 09:41:51 EDT
Created attachment 268845 [details]
1-beforeMovingEdge.png
Comment 2 Laurent Redor CLA 2017-06-09 09:42:11 EDT
Created attachment 268846 [details]
2-afterMovingEdge.png
Comment 3 Eclipse Genie CLA 2017-06-09 17:01:11 EDT
New Gerrit change created: https://git.eclipse.org/r/99055
Comment 5 Guillaume Doux CLA 2017-06-30 10:49:00 EDT
Validated with Sirius 4.1.6-S20170628-064814
Comment 6 Pierre-Charles David CLA 2017-07-07 07:25:18 EDT
Available in Sirius 4.1.6, see https://wiki.eclipse.org/Sirius/4.1.6 for details.