Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2017-02-13 12:25:51 +0000
committerGerrit Code Review @ Eclipse.org2017-02-16 09:23:08 +0000
commit584dcad708bfe26a33b52472d7aba89267f999e8 (patch)
treee7918b1ff159bcbb72811446e20aaf5c437dcc31 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus
parent50e9546ba184f06c89529f6f9bf359685c67be62 (diff)
downloadorg.eclipse.papyrus-584dcad708bfe26a33b52472d7aba89267f999e8.tar.gz
org.eclipse.papyrus-584dcad708bfe26a33b52472d7aba89267f999e8.tar.xz
org.eclipse.papyrus-584dcad708bfe26a33b52472d7aba89267f999e8.zip
Bug 511818 - [Activitiy diagram] Exception when "content" compartment is
invisible Change-Id: I9bcf5360921b24b8a1e5a60eadd65e8ee336a2c3 Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
index ffe3fd9bc69..f045cfb866e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
@@ -190,16 +190,15 @@ public class ActivityFigure extends RoundedCompartmentFigure {
Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
paramBoundcontainer.y = getStereotypePropertiesContent().getBounds().getBottomLeft().y;
getParameterFigure().setBounds(paramBoundcontainer);
- if (getParameterFigure().getChildren().size() > 0) {
+ if (getParameterFigure().getChildren().size() > 0 && shapeCompartment.getChildren().size() > 0) {
((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
}
} else {
Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
paramBoundcontainer.y = getNameLabel().getBounds().getBottomLeft().y;
getParameterFigure().setBounds(paramBoundcontainer);
- if (getParameterFigure().getChildren().size() > 0) {
+ if (getParameterFigure().getChildren().size() > 0 && shapeCompartment.getChildren().size() > 0) {
((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
- ;
}
}
}
@@ -443,10 +442,10 @@ public class ActivityFigure extends RoundedCompartmentFigure {
public RectangleFigure getCompartmentFigure() {
return fCompartmentFigure;
}
-
+
public void setRightAndBottomMargin(int rightAndBottomMargin){
ActivityLayoutManager lm = (ActivityLayoutManager) getLayoutManager();
-
+
if(lm != null){
lm.setRightAndBottomMargin(rightAndBottomMargin);
}

Back to the top