Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2012-04-17 16:23:51 +0000
committerKenn Hussey2012-04-17 16:23:51 +0000
commit852cfbaea52db1195cfa93d4191e4231c295d935 (patch)
tree92ab3ad8e95359026f0d8289896f54757faf2cc6 /plugins/org.eclipse.uml2.uml
parent29e5874c331453f6214650d13c2f62e729975ee0 (diff)
downloadorg.eclipse.uml2.test-852cfbaea52db1195cfa93d4191e4231c295d935.tar.gz
org.eclipse.uml2.test-852cfbaea52db1195cfa93d4191e4231c295d935.tar.xz
org.eclipse.uml2.test-852cfbaea52db1195cfa93d4191e4231c295d935.zip
[364419] Adding utility for stand-alone registry initialization.
Diffstat (limited to 'plugins/org.eclipse.uml2.uml')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF202UMLResourceFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF2UMLResourceFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML212UMLResourceFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML22UMLResourceFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML302UMLResourceFactoryImpl.java10
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLResourceFactoryImpl.java11
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLResourceFactoryImpl.java10
7 files changed, 63 insertions, 12 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF202UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF202UMLResourceFactoryImpl.java
index d4225d7a..7ce21b92 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF202UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF202UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2007, 2012 IBM Corporation, Embarcadero Technologies, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* Kenn Hussey (IBM Corporation, Embarcadero Technologies) - initial API and implementation
- * Kenn Hussey (CEA) - 327039
+ * Kenn Hussey (CEA) - 327039, 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.CMOF202UMLResource;
import org.eclipse.uml2.uml.resource.CMOF2UMLExtendedMetaData;
@@ -66,6 +67,12 @@ public class CMOF202UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF2UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF2UMLResourceFactoryImpl.java
index a7cfdacd..898756f8 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF2UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/CMOF2UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2007, 2012 IBM Corporation, Embarcadero Technologies, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* Kenn Hussey (IBM Corporation, Embarcadero Technologies) - initial API and implementation
- * Kenn Hussey (CEA) - 351774
+ * Kenn Hussey (CEA) - 351774, 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.CMOF2UMLExtendedMetaData;
import org.eclipse.uml2.uml.resource.CMOF2UMLResource;
@@ -69,6 +70,12 @@ public class CMOF2UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML212UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML212UMLResourceFactoryImpl.java
index cc0f0062..b8b3f022 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML212UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML212UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011 IBM Corporation, CEA, and others.
+ * Copyright (c) 2008, 2012 IBM Corporation, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM - initial API and implementation
- * Kenn Hussey (CEA) - 327039
+ * Kenn Hussey (CEA) - 327039, 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UML212UMLResourceHandler;
import org.eclipse.uml2.uml.resource.UML212UMLExtendedMetaData;
@@ -75,6 +76,12 @@ public class UML212UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML22UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML22UMLResourceFactoryImpl.java
index 3b91cc5c..2fc38cb9 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML22UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML22UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2012 IBM Corporation, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,8 +7,8 @@
*
* Contributors:
* IBM - initial API and implementation
+ * Kenn Hussey (CEA) - 364419
*
- * $Id: UML22UMLResourceFactoryImpl.java,v 1.7 2006/12/14 15:49:34 khussey Exp $
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.UML22UMLExtendedMetaData;
import org.eclipse.uml2.uml.resource.UML22UMLResource;
@@ -65,6 +66,12 @@ public class UML22UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML302UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML302UMLResourceFactoryImpl.java
index 3e825e65..427af9a9 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML302UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/UML302UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 CEA and others.
+ * Copyright (c) 2011, 2012 CEA and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* CEA - initial API and implementation
+ * Kenn Hussey (CEA) - 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -31,6 +32,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
/**
* Resource factory that converts .uml models.
@@ -73,6 +75,12 @@ public class UML302UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLResourceFactoryImpl.java
index 0b12a38e..5ca538b0 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI212UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011 IBM Corporation, CEA, and others.
+ * Copyright (c) 2008, 2012 IBM Corporation, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM - initial API and implementation
- * Kenn Hussey (CEA) - 327039
+ * Kenn Hussey (CEA) - 327039, 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.resource.CMOF2UMLResourceHandler;
import org.eclipse.uml2.uml.resource.UML212UMLResourceHandler;
@@ -89,6 +90,12 @@ public class XMI212UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLResourceFactoryImpl.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLResourceFactoryImpl.java
index df5279f4..e2171873 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLResourceFactoryImpl.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/resource/XMI222UMLResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 CEA and others.
+ * Copyright (c) 2011, 2012 CEA and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* CEA - initial API and implementation
+ * Kenn Hussey (CEA) - 364419
*
*/
package org.eclipse.uml2.uml.internal.resource;
@@ -34,6 +35,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;
+import org.eclipse.emf.mapping.ecore2xml.util.Ecore2XMLResource;
/**
* Resource factory that converts .xmi models.
@@ -86,6 +88,12 @@ public class XMI222UMLResourceFactoryImpl
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.setPackageRegistry(ePackageRegistry);
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Ecore2XMLResource.FILE_EXTENSION,
+ Ecore2XMLResource.Factory.INSTANCE);
+
Ecore2XMLRegistry ecore2xmlRegistry = new Ecore2XMLRegistryImpl(
Ecore2XMLRegistry.INSTANCE);
ecore2xmlRegistry

Back to the top