Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2011-12-02 03:06:23 +0000
committerKenn Hussey2011-12-02 03:06:23 +0000
commitf355263b4b42a329176c536fa080c79f825f23d7 (patch)
tree60760560cc56c6e93501b0874c30794bcb8edbea /plugins/org.eclipse.uml2.uml
parentf4c10f6a9c93a92854616471194d3d71897cf849 (diff)
downloadorg.eclipse.uml2.test-f355263b4b42a329176c536fa080c79f825f23d7.tar.gz
org.eclipse.uml2.test-f355263b4b42a329176c536fa080c79f825f23d7.tar.xz
org.eclipse.uml2.test-f355263b4b42a329176c536fa080c79f825f23d7.zip
[365027] Ensuring enumeration literal classifiers are handled for legacy
XMI resources.
Diffstat (limited to 'plugins/org.eclipse.uml2.uml')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLHandler.java16
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLHandler.java15
2 files changed, 30 insertions, 1 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLHandler.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLHandler.java
index ab4f8d88..d64620c1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLHandler.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLHandler.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM - initial API and implementation
- * Kenn Hussey (CEA) - 327039
+ * Kenn Hussey (CEA) - 327039, 365027
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -24,6 +24,9 @@ import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.EMOFExtendedMetaData;
import org.eclipse.emf.ecore.xml.type.AnyType;
+
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UML212UMLExtendedMetaData;
import org.eclipse.uml2.uml.resource.UMLResource;
import org.eclipse.uml2.uml.resource.XMI2UMLResource;
@@ -185,4 +188,15 @@ public class XMI212UMLHandler
}
}
+ @Override
+ protected void setFeatureValue(EObject object, EStructuralFeature feature,
+ Object value, int position) {
+
+ if (feature == UMLPackage.Literals.INSTANCE_SPECIFICATION__CLASSIFIER && object instanceof EnumerationLiteral) {
+ return;
+ }
+
+ super.setFeatureValue(object, feature, value, position);
+ }
+
}
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLHandler.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLHandler.java
index fbeab21c..e474da32 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLHandler.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLHandler.java
@@ -7,6 +7,7 @@
*
* Contributors:
* CEA - initial API and implementation
+ * Kenn Hussey (CEA) - 365027
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -23,6 +24,9 @@ import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.EMOFExtendedMetaData;
import org.eclipse.emf.ecore.xml.type.AnyType;
+
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UML212UMLExtendedMetaData;
import org.eclipse.uml2.uml.resource.UMLResource;
import org.eclipse.uml2.uml.resource.XMI2UMLResource;
@@ -178,4 +182,15 @@ public class XMI222UMLHandler
}
}
+ @Override
+ protected void setFeatureValue(EObject object, EStructuralFeature feature,
+ Object value, int position) {
+
+ if (feature == UMLPackage.Literals.INSTANCE_SPECIFICATION__CLASSIFIER && object instanceof EnumerationLiteral) {
+ return;
+ }
+
+ super.setFeatureValue(object, feature, value, position);
+ }
+
}

Back to the top