Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2018-09-04 05:50:17 -0400
committerCamille Letavernier2018-09-24 06:48:55 -0400
commitc222452ef1ae32f57522f9475db45af40683b0fc (patch)
tree08df1c70672835a8ea146c2a5322eb5223067097 /plugins
parent4d4cd20f89cd62ccf7ba078964ef4d5fbf7e32e7 (diff)
downloadorg.eclipse.papyrus-c222452ef1ae32f57522f9475db45af40683b0fc.tar.gz
org.eclipse.papyrus-c222452ef1ae32f57522f9475db45af40683b0fc.tar.xz
org.eclipse.papyrus-c222452ef1ae32f57522f9475db45af40683b0fc.zip
Bug 536631: Add RoutingConstraints to the DurationLinkFigure
- Routing is not supported, but if a BendpointEditPolicy is installed on the link, it will crash if the constraints are not present. Change-Id: I967e00b33559ca7919d35bb7852cebbcc0b5179f 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/figures/DurationLinkFigure.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DurationLinkFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DurationLinkFigure.java
index 5dc926ce906..7399a2bcb3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DurationLinkFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/figures/DurationLinkFigure.java
@@ -13,8 +13,10 @@
package org.eclipse.papyrus.uml.diagram.sequence.figures;
+import java.util.ArrayList;
import java.util.List;
+import org.eclipse.draw2d.Bendpoint;
import org.eclipse.draw2d.ConnectionRouter;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
@@ -392,4 +394,15 @@ public class DurationLinkFigure extends UMLEdgeFigure {
add(this.durationLabel);
}
+ @Override
+ public Object getRoutingConstraint() {
+ // Bendpoints should at least contain the start and end points; otherwise the
+ // bendpoint policy will crash. We don't support bendpoints, so just return
+ // a new list everytime.
+ List<Bendpoint> list = new ArrayList<>();
+ list.add(this::getStart);
+ list.add(this::getEnd);
+ return list;
+ }
+
}

Back to the top