summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-23 04:45:13 (EDT)
committerEike Stepper2007-07-23 04:45:13 (EDT)
commit32575f773251b7cc01aa23f18c1faca82c2c3a03 (patch)
treefa778c486c5a6b7d8828d79169b9694cac15a974
parent2785869725f68275eb32bf94af9ae78962d00cbb (diff)
downloadcdo-32575f773251b7cc01aa23f18c1faca82c2c3a03.zip
cdo-32575f773251b7cc01aa23f18c1faca82c2c3a03.tar.gz
cdo-32575f773251b7cc01aa23f18c1faca82c2c3a03.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOMetaImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java8
3 files changed, 14 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOMetaImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOMetaImpl.java
index 98ba97d..4bf814c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOMetaImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOMetaImpl.java
@@ -42,9 +42,11 @@ public class CDOMetaImpl implements InternalCDOObject
private CDOID id;
- public CDOMetaImpl(InternalEObject metaInstance)
+ public CDOMetaImpl(CDOViewImpl view, InternalEObject metaInstance, CDOID id)
{
+ this.view = view;
this.metaInstance = metaInstance;
+ this.id = id;
}
public CDOViewImpl getView()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index f06d8a6..06b6cab 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -42,6 +42,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.protocol.ResourcePathRequest;
+import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
import java.text.MessageFormat;
@@ -294,13 +295,11 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
if (potentialObject instanceof InternalEObject && !(potentialObject instanceof InternalCDOObject))
{
InternalEObject eObject = (InternalEObject)potentialObject;
- CDOID id = session.lookupMetaInstanceID(eObject);
- if (id != null)
+ InternalCDOObject adapter = FSMUtil.adapt(eObject, this);
+ if (adapter != null)
{
- return id;
+ potentialObject = adapter;
}
-
- // potentialObject = FSMUtil.adapt(eObject, this);
}
if (potentialObject instanceof InternalCDOObject)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
index 466b413..724760a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.internal.cdo.util;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.util.ImplementationError;
import org.eclipse.emf.common.notify.Adapter;
@@ -52,7 +53,12 @@ public final class FSMUtil
if (object instanceof EModelElement || object instanceof EGenericType)
{
- return new CDOMetaImpl((InternalEObject)object);
+ InternalEObject eObject = (InternalEObject)object;
+ CDOID id = view.getSession().lookupMetaInstanceID(eObject);
+ if (id != null)
+ {
+ return new CDOMetaImpl(view, eObject, id);
+ }
}
if (object instanceof InternalEObject)