Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-04-25 09:35:54 -0400
committerGerrit Code Review @ Eclipse.org2016-04-26 08:18:17 -0400
commit407608dc09bee90373837c06069f5ee91eb4b77c (patch)
treebff5f39a7d6be5ffe192fb5a52de40cb915fd73c /plugins/sysml
parent3e86d7492b13ff1112a043bc442abe14c2c2d5ad (diff)
downloadorg.eclipse.papyrus-407608dc09bee90373837c06069f5ee91eb4b77c.tar.gz
org.eclipse.papyrus-407608dc09bee90373837c06069f5ee91eb4b77c.tar.xz
org.eclipse.papyrus-407608dc09bee90373837c06069f5ee91eb4b77c.zip
Cast error at getBorderItemLocator() for LabelEditPart
- add cast test at getBorderItemLocator - Remove Resizable label case in PapyrusLabelEditPart - fix port locator for sysml case Change-Id: I04940ee79dcfaa4d4f9ccb657227ac9a3e131322 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/sysml')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java5
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java
index eb927fc474b..f21cb9de9ad 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java
@@ -57,7 +57,7 @@ public class FlowPortAffixedLabelNameEditPart extends AbstractElementLabelEditPa
IFigure parentFigure = getFigure().getParent();
if (parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return constraint instanceof IBorderItemLocator ? (IBorderItemLocator) constraint : null;
}
return null;
}
@@ -97,7 +97,7 @@ public class FlowPortAffixedLabelNameEditPart extends AbstractElementLabelEditPa
return new PapyrusWrappingLabel();
}
-
+
/**
* @see org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart#getDefaultTextAlignment()
*
@@ -107,6 +107,7 @@ public class FlowPortAffixedLabelNameEditPart extends AbstractElementLabelEditPa
protected int getDefaultTextAlignment() {
return PositionConstants.LEFT;
}
+
/**
* {@inheritDoc}
*/
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java
index 8d037e64241..fca51315244 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java
@@ -49,7 +49,7 @@ public class AppliedStereotypeAffixedLabelEditPart extends AbstractElementLabelE
IFigure parentFigure = getFigure().getParent();
if (parentFigure != null && parentFigure.getLayoutManager() != null) {
Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
+ return constraint instanceof IBorderItemLocator ? (IBorderItemLocator) constraint : null;
}
return null;
}

Back to the top