Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatilov2015-10-26 16:55:14 -0400
committerGerrit Code Review @ Eclipse.org2015-10-30 07:10:23 -0400
commit111444367334a4634e74b7cb90991da862ce3c93 (patch)
tree25508166f4c13167924a538755a6b40a4e6d19f4 /plugins
parent52811c7c484181719c747c4932430812ecb0d27c (diff)
downloadorg.eclipse.papyrus-111444367334a4634e74b7cb90991da862ce3c93.tar.gz
org.eclipse.papyrus-111444367334a4634e74b7cb90991da862ce3c93.tar.xz
org.eclipse.papyrus-111444367334a4634e74b7cb90991da862ce3c93.zip
Bug 480486 - Fix sequence diagram tests
- fix TestDurationConstraint_402967#testDurationRotate() - setup preferred size of the DurationConstraint Change-Id: Ic4229e2de85cc7548368a8cf18ab7490f9e17381 Signed-off-by: ashatilov <shatilov@montages.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/edit/parts/CustomDurationConstraintEditPart.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
index 255aae98e93..5dfdb40f9f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomDurationConstraintEditPart.java
@@ -58,6 +58,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.geometry.PointListUtilities;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -288,6 +289,14 @@ public class CustomDurationConstraintEditPart extends DurationConstraintEditPart
return primaryShape = new CustomDurationConstraintFigure();
}
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ nodeShape = super.setupContentPane(nodeShape);
+ DefaultSizeNodeFigure parent = (DefaultSizeNodeFigure) nodeShape.getParent();
+ nodeShape.setPreferredSize(parent.getDefaultSize());
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
/**
* This method creates a specific edit policy for time realted elements
*

Back to the top