Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Bouhier2013-12-17 10:19:52 -0500
committerChristophe Bouhier2014-01-02 09:44:32 -0500
commitadc1b9a825444d6da9a2b3e10d9a2209adefa787 (patch)
tree9fecf7b07f815845f3e7b0c51c045d8bce71831a
parentd7e265dd9ef72daa9fd2f6990a4426f446e29b7e (diff)
downloadorg.eclipse.emf.edapt-adc1b9a825444d6da9a2b3e10d9a2209adefa787.tar.gz
org.eclipse.emf.edapt-adc1b9a825444d6da9a2b3e10d9a2209adefa787.tar.xz
org.eclipse.emf.edapt-adc1b9a825444d6da9a2b3e10d9a2209adefa787.zip
- Should call getResource instead of createResource to deal with other
than XMI resources. I.e. a CDO resource.
-rw-r--r--plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/ResourceUtils.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/ResourceUtils.java b/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/ResourceUtils.java
index 00fd504..0f4a38d 100644
--- a/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/ResourceUtils.java
+++ b/plugins/org.eclipse.emf.edapt.common/src/org/eclipse/emf/edapt/common/ResourceUtils.java
@@ -25,11 +25,11 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EPackage.Registry;
+import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
+import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
@@ -89,9 +89,11 @@ public final class ResourceUtils {
if (isPathmap(modelURI)) {
continue;
}
- Resource resource = resourceSet.createResource(modelURI);
+
+ Resource resource = resourceSet.getResource(modelURI, true);
+// Resource resource = resourceSet.createResource(modelURI);
try {
- resource.load(options);
+ resource.load(options);
} catch (Resource.IOWrappedException e) {
// ignore
EList<Diagnostic> errors = resource.getErrors();

Back to the top