Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #485010 +++ Steps to reproduce: > In a runtime, on master, open the docbook sample VSP > open the sample aird model > open the obvious diagram and create a chapter, a big section, a medium section, a tiny section and a note > open the evoluate view diagram > select "Sect2" and try to move it You will get the following stack > org.eclipse.core.commands.ExecutionException: While executing ... exception occurred > at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(:524) > at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.exe..(71 > ... > Caused by: java.lang.ArithmeticException: / by zero > at java.math.BigDecimal.divideAndRound(BigDecimal.java:4106) > at java.math.BigDecimal.divide(BigDecimal.java:5153) > at java.math.BigDecimal.divide(BigDecimal.java:1561) > at org.eclipse.draw2d.geometry.PrecisionGeometry.preciseDivide(l48) > at org.eclipse.draw2d.geometry.Vector.getAngle(Vector.java:168) > at oesd.ui.internal.edit.parts.locator.EdgeLabelQuery.getSameLineStatus(l507) For the current case, both vectors are horizontal (and the edge is hidden, we see only the arrow), it seems we might use referenceVector.isParallelTo(vector) and then check the horizontallity/verticallity and direction before computing the angle.
New Gerrit change created: https://git.eclipse.org/r/99586
New Gerrit change created: https://git.eclipse.org/r/99585
Gerrit change https://git.eclipse.org/r/99586 was merged to [v3.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=88db77e391631348f68415ba67b069157bc6912b
Gerrit change https://git.eclipse.org/r/99585 was merged to [v3.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=76ebd809ed1059d0f08e5aa9cd07876e67a57fcb
For scenario of bug 485010 comment 1, the files compatible with this version can be found here : http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.tests.junit/data/unit/mappings/edges_on_edges?h=v3.1.x
Verified with Sirius 3.1.9-S20170627-085227 (scenario of bug 485010 comment 1)
Available in Sirius 3.1.9, see https://wiki.eclipse.org/Sirius/3.1.9 for details.