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

Bug 576057

Summary: The z-order of edges changes the drawing of some diagram
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Glenn Plouhinec <glenn.plouhinec>
Severity: normal    
Priority: P3 CC: glenn.plouhinec
Version: unspecified   
Target Milestone: 6.6.0   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=574273
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/185726
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=bc6bc46006cc9ef98e84385164fcc61dc6ba83c3
Whiteboard:
Bug Depends on:    
Bug Blocks: 576216    
Attachments:
Description Flags
diffBeforeAfterZOrder.png
none
JumpLinksTest-zOrderRegression.zip
none
JumpLinksTest-zOrderRegression.zip none

Description Laurent Redor CLA 2021-09-17 06:28:43 EDT
Created attachment 287155 [details]
diffBeforeAfterZOrder.png

Since bug 574273, some diagrams are not drawn exactly as before.

This is "normal" because before, the edges are drawn according to the creation order of their sources. Now, they are drawn according to the creation order of edges.
In the file "diffBeforeAfterZOrder.png", you can see 4 cases:
* Case A: The order of creation of source nodes is the same than the order of creation of edges. For information, the numbers suffixing nodes and edges correspond to the creation order.
    * The display result is the same before and after the new feature concerning z-order.
* Case B: The order of creation of source nodes is not the same than the order of creation of edges. For information, the numbers suffixing nodes and edges correspond to the creation order.
    * The display result is not the same before and after the new feature concerning z-order. So the jumplink is not on the same edge.
* Case C: The order of creation of source nodes is the same than the order of creation of edges. For information, the numbers suffixing nodes and edges correspond to the creation order. In this case, both edges have not bendpoints constraint in model. "c4" has only a bendpoint, added graphically, to avoid an overlap between "c3" and "c4".
    * The display result is the same before and after the new feature concerning z-order.
* Case D: The order of creation of source nodes is not the same than the order of creation of edges. For information, the numbers suffixing nodes and edges correspond to the creation order. In this case, both edges have not bendpoints constraint in model. "d3" has only a bendpoint, added graphically, to avoid an overlap between "d3" and "d4".
    * The display result is not the same before and after the new feature concerning z-order. After the z-order feature, "d3" is drawn in first so without bendpoint and "d4" is drawn in second so with a "graphical bendpoint".
	
The project JumpLinksTest-zOrderRegression.zip contains the diagram used for the above screenshot. After the fix of the issue, the diagram should be drawn as before the feature concerning z-order.

A migration participant must be added to "sort" GMF edges list according to the nodes order.
Comment 1 Laurent Redor CLA 2021-09-17 06:29:05 EDT
Created attachment 287156 [details]
JumpLinksTest-zOrderRegression.zip
Comment 2 Laurent Redor CLA 2021-09-22 08:21:29 EDT
Created attachment 287189 [details]
JumpLinksTest-zOrderRegression.zip
Comment 3 Eclipse Genie CLA 2021-09-23 04:54:46 EDT
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/185726
Comment 4 Laurent Redor CLA 2021-09-23 04:56:56 EDT
Steps to validate:
* Import project JumpLinksTest
* Open diagram "new Diag"
* The diagram must be displayed as it is in "/JumpLinksTest/diagramBeforeZOrder.png", especially
    * One jump link on b6
    * No jump link on b5
    * straight line for d4
    * line with a bendpoint for d3
Comment 6 Glenn Plouhinec CLA 2021-10-19 11:16:18 EDT
Validated with ODCE 11.6.0 IT1.
The migration participant's message appears in the error log.
Comment 7 Pierre-Charles David CLA 2021-12-10 04:07:01 EST
Available in Sirius 6.6.0: https://projects.eclipse.org/projects/modeling.sirius/releases/6.6.0