diff options
author | cmraidha | 2011-01-28 10:19:02 +0000 |
---|---|---|
committer | cmraidha | 2011-01-28 10:19:02 +0000 |
commit | 162e2cecf5c3ab7471eadb704d86d5de6dcbace0 (patch) | |
tree | 66877d8f53e0f6136a95e91ad44e17e8509c7339 | |
parent | fae425850d7ac2c339e782a58e6869a3af03c096 (diff) | |
download | org.eclipse.papyrus-162e2cecf5c3ab7471eadb704d86d5de6dcbace0.tar.gz org.eclipse.papyrus-162e2cecf5c3ab7471eadb704d86d5de6dcbace0.tar.xz org.eclipse.papyrus-162e2cecf5c3ab7471eadb704d86d5de6dcbace0.zip |
[Bug 335662] - Display of EnumerationLiterals in static profile
-rw-r--r-- | plugins/uml/org.eclipse.papyrus.umlutils/src/org/eclipse/papyrus/umlutils/StereotypeUtil.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.umlutils/src/org/eclipse/papyrus/umlutils/StereotypeUtil.java b/plugins/uml/org.eclipse.papyrus.umlutils/src/org/eclipse/papyrus/umlutils/StereotypeUtil.java index 4d8ae2487c0..e6825f7f30a 100644 --- a/plugins/uml/org.eclipse.papyrus.umlutils/src/org/eclipse/papyrus/umlutils/StereotypeUtil.java +++ b/plugins/uml/org.eclipse.papyrus.umlutils/src/org/eclipse/papyrus/umlutils/StereotypeUtil.java @@ -362,7 +362,11 @@ public class StereotypeUtil { if((property.getUpper() == 1) && (umlElement.getValue(stereotype, property.getName()) != null)) { if((property.getLower() != 0) || umlElement.getValue(stereotype, property.getName()) != null) { if(property.isSetDefault() || umlElement.getValue(stereotype, property.getName()) != null) { - out = property.getName() + EQUAL_SEPARATOR + ((EnumerationLiteral)umlElement.getValue(stereotype, property.getName())).getLabel() + PROPERTY_VALUE_SEPARATOR;; + Object val = umlElement.getValue(stereotype, property.getName()); + if (val instanceof EnumerationLiteral) + out = property.getName() + EQUAL_SEPARATOR + ((EnumerationLiteral)val).getLabel() + PROPERTY_VALUE_SEPARATOR; + else + out = property.getName() + EQUAL_SEPARATOR + val + PROPERTY_VALUE_SEPARATOR; } else { out = property.getName() + PROPERTY_VALUE_SEPARATOR; } |