Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-05-07 19:58:32 +0000
committerEike Stepper2009-05-07 19:58:32 +0000
commit4e146f0777dac04413d1de93c1fafbe7a4d27fa2 (patch)
tree8f0dc0045f6cbbd51f498c8de95efba3626875b4
parent7625369520d03e13b93f99146b199fa3ac8e684e (diff)
downloadcdo-4e146f0777dac04413d1de93c1fafbe7a4d27fa2.tar.gz
cdo-4e146f0777dac04413d1de93c1fafbe7a4d27fa2.tar.xz
cdo-4e146f0777dac04413d1de93c1fafbe7a4d27fa2.zip
[247226] Transparently support legacy models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247226
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyWrapper.java14
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectWrapper.java6
2 files changed, 13 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyWrapper.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyWrapper.java
index 43771d9943..9804644297 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyWrapper.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyWrapper.java
@@ -29,6 +29,7 @@ import org.eclipse.net4j.util.ReflectUtil;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.NotifyingListImpl;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
@@ -322,7 +323,18 @@ public abstract class CDOLegacyWrapper extends CDOObjectWrapper
protected void revisionToInstanceFeature(EStructuralFeature feature, CDOPackageRegistry packageRegistry)
{
- CDOObjectImpl.revisionToInstanceFeature(this, revision, feature);
+ // Attempt 4
+ Object value = revision.getValue(feature);
+ view.getStore().set(instance, feature, Notification.NO_INDEX, value);
+
+ // // Attempt 3
+ // Object value = revision.getValue(feature);
+ // instance.eSet(feature, value);
+
+ // // Attempt 2
+ // CDOObjectImpl.revisionToInstanceFeature(this, revision, feature);
+
+ // // Attempt 1
// Object value = revision.getValue(feature);
// if (feature.isMany())
// {
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectWrapper.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectWrapper.java
index 44119e45f7..8da5d75519 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectWrapper.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectWrapper.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
import org.eclipse.emf.cdo.view.CDOView;
-import org.eclipse.emf.internal.cdo.CDOObjectImpl.CDOStoreSettingsImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
@@ -363,11 +362,6 @@ public abstract class CDOObjectWrapper implements InternalCDOObject
public EStore eStore()
{
- if (FSMUtil.isTransient(this))
- {
- return CDOStoreSettingsImpl.INSTANCE;
- }
-
return instance.eStore();
}

Back to the top