Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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