Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-06-03 09:54:35 -0400
committerCamille Letavernier2015-06-03 09:54:35 -0400
commit93c8343874b767d64d7fd7c2828c344282f89804 (patch)
tree636b67b76115af940b2d06b87912e6397b80b382
parent4d31bce01b3ad69926b86676137c2bab26d78898 (diff)
downloadorg.eclipse.papyrus-93c8343874b767d64d7fd7c2828c344282f89804.tar.gz
org.eclipse.papyrus-93c8343874b767d64d7fd7c2828c344282f89804.tar.xz
org.eclipse.papyrus-93c8343874b767d64d7fd7c2828c344282f89804.zip
469280: [SysML Diagrams] ClassCastException in
AssociationLinkLabelSourceRoleEditPart https://bugs.eclipse.org/bugs/show_bug.cgi?id=469280
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java6
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java6
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java6
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java6
4 files changed, 20 insertions, 4 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
index 81f430969c6..d85d3c0a03b 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
@@ -55,7 +55,11 @@ public class AssociationLinkLabelSourceMultiplicityEditPart extends AbstractElem
*/
@Override
public EObject getParserElement() {
- Association association = (Association) resolveSemanticElement();
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
View owner = ViewUtil.getContainerView(getNotationView());
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
index 1a507ee3faa..8b64595f476 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
@@ -55,7 +55,11 @@ public class AssociationLinkLabelSourceRoleEditPart extends AbstractElementLabel
*/
@Override
public EObject getParserElement() {
- Association association = (Association) resolveSemanticElement();
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
View owner = ViewUtil.getContainerView(getNotationView());
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
index fce08470d1c..b612478b8f1 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
@@ -55,7 +55,11 @@ public class AssociationLinkLabelTargetMultiplicityEditPart extends AbstractElem
*/
@Override
public EObject getParserElement() {
- Association association = (Association) resolveSemanticElement();
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
View owner = ViewUtil.getContainerView(getNotationView());
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
index 0f97e73bc83..c008c4c0cf2 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
@@ -55,7 +55,11 @@ public class AssociationLinkLabelTargetRoleEditPart extends AbstractElementLabel
*/
@Override
public EObject getParserElement() {
- Association association = (Association) resolveSemanticElement();
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
View owner = ViewUtil.getContainerView(getNotationView());

Back to the top