summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-03 18:32:48 (EDT)
committerEike Stepper2007-08-03 18:32:48 (EDT)
commitfb0abda24701af103322c61472d01d747083c329 (patch)
tree8ec5b8a997e8b949c8d9538eda87877bc08c81fe
parentb5ed745b45320f38f25d86432188c06c51bbe691 (diff)
downloadcdo-fb0abda24701af103322c61472d01d747083c329.zip
cdo-fb0abda24701af103322c61472d01d747083c329.tar.gz
cdo-fb0abda24701af103322c61472d01d747083c329.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java1
2 files changed, 4 insertions, 13 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index 9ebfe6d..499b425 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -28,8 +28,6 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EGenericType;
-import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -243,21 +241,15 @@ public final class CDOUtil
return result;
}
- public static void load(EObject eObject)
+ public static void load(EObject eObject, CDOView view)
{
- if (eObject instanceof EModelElement || eObject instanceof EGenericType)
- {
- return;
- }
-
- InternalCDOObject cdoObject = FSMUtil.adapt(eObject, null);
+ InternalCDOObject cdoObject = FSMUtil.adapt(eObject, view);
CDOStateMachine.INSTANCE.read(cdoObject);
- CDOViewImpl view = (CDOViewImpl)cdoObject.cdoView();
- for (Iterator<InternalCDOObject> it = FSMUtil.iterator(cdoObject.eContents(), view); it.hasNext();)
+ for (Iterator<InternalCDOObject> it = FSMUtil.iterator(cdoObject.eContents(), (CDOViewImpl)view); it.hasNext();)
{
InternalCDOObject content = it.next();
- load(content);
+ load(content, view);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
index 2625065..1e5ad62 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/EMFUtil.java
@@ -72,7 +72,6 @@ public final class EMFUtil
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl());
Resource resource = resourceSet.createResource(URI.createFileURI(fileName));
- CDOUtil.load(root);
EObject copy = EcoreUtil.copy(root);
resource.getContents().add(copy);
try