Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-06-07 06:26:22 -0400
committerGerrit Code Review @ Eclipse.org2016-06-07 10:21:38 -0400
commited2a5b1926d74ca92c4530f5acbbfbe1e6583b22 (patch)
tree81af6d95d498af06764942901d0dc093aa129815
parent15f5add0ff77094d452d21c4695cca13f5c21ea9 (diff)
downloadorg.eclipse.papyrus-ed2a5b1926d74ca92c4530f5acbbfbe1e6583b22.tar.gz
org.eclipse.papyrus-ed2a5b1926d74ca92c4530f5acbbfbe1e6583b22.tar.xz
org.eclipse.papyrus-ed2a5b1926d74ca92c4530f5acbbfbe1e6583b22.zip
JUnit regression on 'org.eclipse.papyrus.uml.diagram.sequence.tests.bug'
-"org.eclipse.papyrus.uml.diagram.sequence.tests.bug.m7.TestTooltip_402964.testSynchronousMessage" -"org.eclipse.papyrus.uml.diagram.sequence.tests.bug.pro20130916.MessageStereotypesTest.testSynchronousMessage" => Reuse the delegating layout with instance of verification before cast. The model which doesn't want to open from Bug 494019 have been tested and work with this patch. Change-Id: Ia0a982d0fbccda55bdf74b2d634b127e197a0e19 Signed-off-by: Fanch BONNABESSE <fanch.bonnabesse@all4tec.net> Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java25
1 files changed, 21 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
index 412eb00cc40..43cec81d8f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/AbstractExecutionSpecificationEditPart.java
@@ -5,11 +5,11 @@ import java.util.HashMap;
import java.util.List;
import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.DelegatingLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Locator;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.RelativeLocator;
-import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.TreeSearch;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
@@ -634,9 +634,26 @@ public abstract class AbstractExecutionSpecificationEditPart extends RoundedComp
@Override
protected NodeFigure createMainFigureWithSVG() {
NodeFigure figure = createSVGNodePlate();
- // bug 494019: [Sequence Diagram] Opening Luna Sequence Diagram into Neon doesn't work : change the layout from DelegatingLayout to StackLayout
- //figure.setLayoutManager(new DelegatingLayout());
- figure.setLayoutManager(new StackLayout());
+ // bug 494019: [Sequence Diagram] Opening Luna Sequence Diagram into Neon doesn't work : change the layout from DelegatingLayout to StackLayout
+ figure.setLayoutManager(new DelegatingLayout() {
+ /**
+ * Override it to verify type of constraint.
+ *
+ * @see org.eclipse.draw2d.DelegatingLayout#layout(org.eclipse.draw2d.IFigure)
+ */
+ @Override
+ public void layout(IFigure parent) {
+ List<?> children = parent.getChildren();
+ for (int i = 0; i < children.size(); i++) {
+ IFigure child = (IFigure) children.get(i);
+
+ Object locator = getConstraint(child);
+ if (locator instanceof Locator) {
+ ((Locator) locator).relocate(child);
+ }
+ }
+ }
+ });
shape = createNodeShape();
figure.add(shape, new FillParentLocator());
setupContentPane(shape);

Back to the top