Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2011-10-06 02:06:46 +0000
committerKenn Hussey2011-10-06 02:06:46 +0000
commit77778fdd9f67c845df808c801d21f15c99d24c38 (patch)
tree333df30d8e18ec0ade459e95582e791fd35aac57 /plugins/org.eclipse.uml2.uml
parentcab66f3576c668586ce408b840cb1d3e9108423b (diff)
downloadorg.eclipse.uml2.test-77778fdd9f67c845df808c801d21f15c99d24c38.tar.gz
org.eclipse.uml2.test-77778fdd9f67c845df808c801d21f15c99d24c38.tar.xz
org.eclipse.uml2.test-77778fdd9f67c845df808c801d21f15c99d24c38.zip
[359983] Registering CMOF package for XMI interchange.
Diffstat (limited to 'plugins/org.eclipse.uml2.uml')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI2UMLResourceFactoryImpl.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI2UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI2UMLResourceFactoryImpl.java
index fa797554..dc62abf7 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI2UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI2UMLResourceFactoryImpl.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM - initial API and implementation
- * Kenn Hussey (CEA) - 327039
+ * Kenn Hussey (CEA) - 327039, 359983
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -16,10 +16,13 @@ import java.util.Map;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.CMOF2UMLResource;
import org.eclipse.uml2.uml.resource.CMOF2UMLResourceHandler;
import org.eclipse.uml2.uml.resource.XMI2UMLExtendedMetaData;
import org.eclipse.uml2.uml.resource.XMI2UMLResource;
@@ -43,8 +46,13 @@ public class XMI2UMLResourceFactoryImpl
public Resource createResource(URI uri) {
XMI2UMLResource resource = (XMI2UMLResource) super.createResource(uri);
- ExtendedMetaData extendedMetaData = new XMI2UMLExtendedMetaData(
+ EPackage.Registry ePackageRegistry = new EPackageRegistryImpl(
EPackage.Registry.INSTANCE);
+ ePackageRegistry.put(CMOF2UMLResource.CMOF_METAMODEL_NS_URI,
+ UMLPackage.eINSTANCE);
+
+ ExtendedMetaData extendedMetaData = new XMI2UMLExtendedMetaData(
+ ePackageRegistry);
Map<Object, Object> defaultSaveOptions = resource
.getDefaultSaveOptions();

Back to the top