Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2018-09-04 03:03:24 -0400
committerCamille Letavernier2018-09-24 06:48:53 -0400
commit4d4cd20f89cd62ccf7ba078964ef4d5fbf7e32e7 (patch)
tree89b4fbcac9dac5f004f16e952866b1ba974a3ac5 /plugins
parentaf1f7daa9feca4b1434f523e81cadadac4945b1c (diff)
downloadorg.eclipse.papyrus-4d4cd20f89cd62ccf7ba078964ef4d5fbf7e32e7.tar.gz
org.eclipse.papyrus-4d4cd20f89cd62ccf7ba078964ef4d5fbf7e32e7.tar.xz
org.eclipse.papyrus-4d4cd20f89cd62ccf7ba078964ef4d5fbf7e32e7.zip
Bug 536631: [Sequence Diagram] Support DurationConstraint/Observation as
a Connection between two events - Fix link creation tests Change-Id: I2638c8ab2359722f41b270e37f727b80bcc5a114 Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationUtil.java
index e5bca16943e..2f3b38f15df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationUtil.java
@@ -135,14 +135,16 @@ public class OccurrenceSpecificationUtil {
* @param targetFigure
* The connection figure representing the message
* @param requestLocation
- * The mouse location for the current {@link Request}
+ * The mouse location for the current {@link Request}, in Viewer coordinates
* @return
* <code>true</code> if the given request is closer to the source of the connection; false if it is closer to the target
*/
public static boolean isSource(IFigure targetFigure, Point requestLocation) {
+ requestLocation = requestLocation.getCopy();
IFigure connection = targetFigure;
if (connection instanceof Connection) {
PointList points = ((Connection) connection).getPoints();
+ connection.translateToRelative(requestLocation);
if (points.size() >= 2) {
Point source = points.getFirstPoint();
Point target = points.getLastPoint();

Back to the top