summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-23 04:30:49 (EDT)
committerEike Stepper2007-07-23 04:30:49 (EDT)
commit2785869725f68275eb32bf94af9ae78962d00cbb (patch)
tree44d031ab8e1b0306b4999450fb94633caf8a2c07
parentf5d9209ef8b26a3105b7bb589904711e41c00ecc (diff)
downloadcdo-2785869725f68275eb32bf94af9ae78962d00cbb.zip
cdo-2785869725f68275eb32bf94af9ae78962d00cbb.tar.gz
cdo-2785869725f68275eb32bf94af9ae78962d00cbb.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java427
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java13
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java23
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java24
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java7
5 files changed, 463 insertions, 31 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 3d9eb02..7f35ab1 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -23,18 +23,31 @@ import org.eclipse.emf.cdo.protocol.util.ImplementationError;
import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EStoreEObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.Resource.Internal;
+import org.eclipse.emf.ecore.util.DelegatingEcoreEList;
+import org.eclipse.emf.ecore.util.DelegatingFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreEList;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
/**
* @author Eike Stepper
*/
@@ -52,7 +65,6 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
public CDOObjectImpl()
{
- super(CDOStore.INSTANCE); // TODO Set store during ATTACH
state = CDOState.TRANSIENT;
eContainer = null;
}
@@ -136,6 +148,8 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
{
((CDOResourceImpl)this).cdoSetView((CDOViewImpl)view);
}
+
+ eSetStore(cdoView().getStore());
}
public void cdoInternalSetResource(CDOResource resource)
@@ -194,6 +208,25 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
@Override
+ protected FeatureMap createFeatureMap(EStructuralFeature eStructuralFeature)
+ {
+ return new CDOStoreFeatureMap(eStructuralFeature);
+ }
+
+ @Override
+ protected EList<?> createList(EStructuralFeature eStructuralFeature)
+ {
+ EClassifier eType = eStructuralFeature.getEType();
+ if (eType.getInstanceClassName() == "java.util.Map$Entry")
+ {
+ return new EcoreEMap<Object, Object>((EClass)eType, eType.getInstanceClass(),
+ new CDOStoreEList<BasicEMap.Entry<Object, Object>>(eStructuralFeature));
+ }
+
+ return new CDOStoreEList<Object>(eStructuralFeature);
+ }
+
+ @Override
protected void eInitializeContainer()
{
throw new ImplementationError();
@@ -296,7 +329,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
else
{
// Delegate to CDOStore
- container = CDOStore.INSTANCE.getContainer(this);
+ container = getStore().getContainer(this);
}
if (container instanceof CDOResource)
@@ -316,7 +349,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
// Delegate to CDOStore
- return CDOStore.INSTANCE.getContainingFeatureID(this);
+ return getStore().getContainingFeatureID(this);
}
@Override
@@ -335,7 +368,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
else
{
// Delegate to CDOStore
- CDOStore.INSTANCE.setContainer(this, newContainer, newContainerFeatureID);
+ getStore().setContainer(this, newContainer, newContainerFeatureID);
}
}
@@ -446,4 +479,390 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
eSettings[i] = null;
}
}
+
+ private CDOStore getStore()
+ {
+ return cdoView().getStore();
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public class CDOStoreEList<E> extends DelegatingEcoreEList.Dynamic<E>
+ {
+ private static final long serialVersionUID = 1L;
+
+ public CDOStoreEList(EStructuralFeature eStructuralFeature)
+ {
+ super(CDOObjectImpl.this, eStructuralFeature);
+ }
+
+ @Override
+ protected List<E> delegateList()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public EStructuralFeature getEStructuralFeature()
+ {
+ return eStructuralFeature;
+ }
+
+ @Override
+ protected void delegateAdd(int index, Object object)
+ {
+ getStore().add(owner, eStructuralFeature, index, object);
+ }
+
+ @Override
+ protected void delegateAdd(Object object)
+ {
+ delegateAdd(delegateSize(), object);
+ }
+
+ @Override
+ protected List<E> delegateBasicList()
+ {
+ int size = delegateSize();
+ if (size == 0)
+ {
+ return ECollections.emptyEList();
+ }
+ else
+ {
+ Object[] data = getStore().toArray(owner, eStructuralFeature);
+ return new EcoreEList.UnmodifiableEList<E>(owner, eStructuralFeature, data.length, data);
+ }
+ }
+
+ @Override
+ protected void delegateClear()
+ {
+ getStore().clear(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected boolean delegateContains(Object object)
+ {
+ return getStore().contains(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected boolean delegateContainsAll(Collection<?> collection)
+ {
+ for (Object o : collection)
+ {
+ if (!delegateContains(o))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected E delegateGet(int index)
+ {
+ return (E)getStore().get(owner, eStructuralFeature, index);
+ }
+
+ @Override
+ protected int delegateHashCode()
+ {
+ return getStore().hashCode(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected int delegateIndexOf(Object object)
+ {
+ return getStore().indexOf(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected boolean delegateIsEmpty()
+ {
+ return getStore().isEmpty(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected Iterator<E> delegateIterator()
+ {
+ return iterator();
+ }
+
+ @Override
+ protected int delegateLastIndexOf(Object object)
+ {
+ return getStore().lastIndexOf(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected ListIterator<E> delegateListIterator()
+ {
+ return listIterator();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected E delegateRemove(int index)
+ {
+ return (E)getStore().remove(owner, eStructuralFeature, index);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected E delegateSet(int index, E object)
+ {
+ return (E)getStore().set(owner, eStructuralFeature, index, object);
+ }
+
+ @Override
+ protected int delegateSize()
+ {
+ return getStore().size(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected Object[] delegateToArray()
+ {
+ return getStore().toArray(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected <T> T[] delegateToArray(T[] array)
+ {
+ return getStore().toArray(owner, eStructuralFeature, array);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected E delegateMove(int targetIndex, int sourceIndex)
+ {
+ return (E)getStore().move(owner, eStructuralFeature, targetIndex, sourceIndex);
+ }
+
+ @Override
+ protected boolean delegateEquals(Object object)
+ {
+ if (object == this)
+ {
+ return true;
+ }
+
+ if (!(object instanceof List))
+ {
+ return false;
+ }
+
+ List<?> list = (List<?>)object;
+ if (list.size() != delegateSize())
+ {
+ return false;
+ }
+
+ for (ListIterator<?> i = list.listIterator(); i.hasNext();)
+ {
+ Object element = i.next();
+ if (element == null ? get(i.previousIndex()) != null : !element.equals(get(i.previousIndex())))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ protected String delegateToString()
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ stringBuffer.append("[");
+ for (int i = 0, size = size(); i < size;)
+ {
+ Object value = delegateGet(i);
+ stringBuffer.append(String.valueOf(value));
+ if (++i < size)
+ {
+ stringBuffer.append(", ");
+ }
+ }
+ stringBuffer.append("]");
+ return stringBuffer.toString();
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public class CDOStoreFeatureMap extends DelegatingFeatureMap
+ {
+ private static final long serialVersionUID = 1L;
+
+ public CDOStoreFeatureMap(EStructuralFeature eStructuralFeature)
+ {
+ super(CDOObjectImpl.this, eStructuralFeature);
+ }
+
+ @Override
+ protected List<FeatureMap.Entry> delegateList()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public EStructuralFeature getEStructuralFeature()
+ {
+ return eStructuralFeature;
+ }
+
+ @Override
+ protected void delegateAdd(int index, Entry object)
+ {
+ getStore().add(owner, eStructuralFeature, index, object);
+ }
+
+ @Override
+ protected void delegateAdd(Entry object)
+ {
+ delegateAdd(delegateSize(), object);
+ }
+
+ @Override
+ protected List<FeatureMap.Entry> delegateBasicList()
+ {
+ int size = delegateSize();
+ if (size == 0)
+ {
+ return ECollections.emptyEList();
+ }
+ else
+ {
+ Object[] data = getStore().toArray(owner, eStructuralFeature);
+ return new EcoreEList.UnmodifiableEList<FeatureMap.Entry>(owner, eStructuralFeature, data.length, data);
+ }
+ }
+
+ @Override
+ protected void delegateClear()
+ {
+ getStore().clear(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected boolean delegateContains(Object object)
+ {
+ return getStore().contains(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected boolean delegateContainsAll(Collection<?> collection)
+ {
+ for (Object o : collection)
+ {
+ if (!delegateContains(o))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ protected Entry delegateGet(int index)
+ {
+ return (Entry)getStore().get(owner, eStructuralFeature, index);
+ }
+
+ @Override
+ protected int delegateHashCode()
+ {
+ return getStore().hashCode(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected int delegateIndexOf(Object object)
+ {
+ return getStore().indexOf(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected boolean delegateIsEmpty()
+ {
+ return getStore().isEmpty(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected Iterator<FeatureMap.Entry> delegateIterator()
+ {
+ return iterator();
+ }
+
+ @Override
+ protected int delegateLastIndexOf(Object object)
+ {
+ return getStore().lastIndexOf(owner, eStructuralFeature, object);
+ }
+
+ @Override
+ protected ListIterator<FeatureMap.Entry> delegateListIterator()
+ {
+ return listIterator();
+ }
+
+ @Override
+ protected Entry delegateRemove(int index)
+ {
+ return (Entry)getStore().remove(owner, eStructuralFeature, index);
+ }
+
+ @Override
+ protected Entry delegateSet(int index, Entry object)
+ {
+ return (Entry)getStore().set(owner, eStructuralFeature, index, object);
+ }
+
+ @Override
+ protected int delegateSize()
+ {
+ return getStore().size(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected Object[] delegateToArray()
+ {
+ return getStore().toArray(owner, eStructuralFeature);
+ }
+
+ @Override
+ protected <T> T[] delegateToArray(T[] array)
+ {
+ return getStore().toArray(owner, eStructuralFeature, array);
+ }
+
+ @Override
+ protected Entry delegateMove(int targetIndex, int sourceIndex)
+ {
+ return (Entry)getStore().move(owner, eStructuralFeature, targetIndex, sourceIndex);
+ }
+
+ @Override
+ protected String delegateToString()
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ stringBuffer.append("[");
+ for (int i = 0, size = size(); i < size;)
+ {
+ Object value = delegateGet(i);
+ stringBuffer.append(String.valueOf(value));
+ if (++i < size)
+ {
+ stringBuffer.append(", ");
+ }
+ }
+ stringBuffer.append("]");
+ return stringBuffer.toString();
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index 8694acd..36e744c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -13,6 +13,8 @@ import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.fsm.FiniteStateMachine;
import org.eclipse.net4j.util.fsm.ITransition;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.protocol.ResourceIDRequest;
@@ -201,7 +203,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
transaction.registerNew(object);
// Attach content tree
- for (Iterator it = FSMUtil.iterator(object.eContents()); it.hasNext();)
+ for (Iterator it = FSMUtil.iterator(object.eContents(), data.view); it.hasNext();)
{
InternalCDOObject content = (InternalCDOObject)it.next();
INSTANCE.process(content, CDOEvent.ATTACH, data);
@@ -221,10 +223,13 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
object.cdoInternalSetState(CDOState.NEW);
// Finalize content tree
- for (Iterator it = FSMUtil.iterator(object.eContents()); it.hasNext();)
+ EList<EObject> contents = object.eContents();
+ for (EObject content : contents)
{
- InternalCDOObject content = (InternalCDOObject)it.next();
- INSTANCE.process(content, CDOEvent.FINALIZE_ATTACH, null);
+ if (content instanceof InternalCDOObject)
+ {
+ INSTANCE.process((InternalCDOObject)content, CDOEvent.FINALIZE_ATTACH, null);
+ }
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
index 9c05c33..8625062 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
@@ -30,13 +30,18 @@ import org.eclipse.emf.internal.cdo.util.ModelUtil;
*/
public final class CDOStore implements EStore
{
- // @Singleton
- public static final CDOStore INSTANCE = new CDOStore();
-
private final ContextTracer TRACER = new ContextTracer(OM.DEBUG_OBJECT, CDOStore.class);
- private CDOStore()
+ private CDOViewImpl view;
+
+ public CDOStore(CDOViewImpl view)
+ {
+ this.view = view;
+ }
+
+ public CDOViewImpl getView()
{
+ return view;
}
public void setContainer(InternalEObject eObject, InternalEObject newContainer, int newContainerFeatureID)
@@ -364,12 +369,12 @@ public final class CDOStore implements EStore
return "PersistentStore";
}
- private static InternalCDOObject getCDOObject(InternalEObject eObject)
+ private InternalCDOObject getCDOObject(Object object)
{
- return FSMUtil.adapt(eObject);
+ return FSMUtil.adapt(object, view);
}
- private static CDOFeatureImpl getCDOFeature(InternalCDOObject cdoObject, EStructuralFeature eFeature)
+ private CDOFeatureImpl getCDOFeature(InternalCDOObject cdoObject, EStructuralFeature eFeature)
{
CDOViewImpl view = (CDOViewImpl)cdoObject.cdoView();
if (view == null)
@@ -404,10 +409,10 @@ public final class CDOStore implements EStore
return revision;
}
- private static void handleContainmentAdd(InternalCDOObject cdoObject, CDOFeatureImpl cdoFeature, Object value)
+ private void handleContainmentAdd(InternalCDOObject cdoObject, CDOFeatureImpl cdoFeature, Object value)
{
InternalCDOObject container = cdoObject;
- InternalCDOObject contained = FSMUtil.adapt(value);
+ InternalCDOObject contained = getCDOObject(value);
CDOViewImpl containerView = (CDOViewImpl)container.cdoView();
CDOViewImpl containedView = (CDOViewImpl)contained.cdoView();
if (containedView != containerView)
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 e66e9eb..f06d8a6 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,7 +42,6 @@ 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;
@@ -66,6 +65,8 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
private Map<CDOID, InternalCDOObject> objects = new HashMap();
+ private CDOStore store = new CDOStore(this);
+
private CDOID lastLookupID;
private InternalCDOObject lastLookupObject;
@@ -91,6 +92,11 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
return session;
}
+ public CDOStore getStore()
+ {
+ return store;
+ }
+
public boolean isDirty()
{
return false;
@@ -214,14 +220,14 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
lastLookupObject = objects.get(id);
if (lastLookupObject == null)
{
- lastLookupObject = createObject(id);
+ lastLookupObject = createObjectForRevision(id);
registerObject(lastLookupObject);
}
return lastLookupObject;
}
- private InternalCDOObject createObject(CDOID id)
+ private InternalCDOObject createObjectForRevision(CDOID id)
{
// if (id.isMeta())
// {
@@ -244,20 +250,17 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
}
CDORevisionImpl revision = lookupRevision(id);
- CDOClassImpl cdoClass = revision.getCDOClass();
- CDOID resourceID = revision.getResourceID();
-
- InternalCDOObject object = newInstance(cdoClass);
+ InternalCDOObject object = newInstance(revision.getCDOClass());
if (object instanceof CDOResourceImpl)
{
object.cdoInternalSetResource((CDOResourceImpl)object);
}
else
{
- CDOResourceImpl resource = getResource(resourceID);
- object.cdoInternalSetResource(resource);
+ object.cdoInternalSetResource(getResource(revision.getResourceID()));
}
+ object.cdoInternalSetView(this);
object.cdoInternalSetRevision(revision);
object.cdoInternalSetID(revision.getID());
object.cdoInternalSetState(CDOState.CLEAN);
@@ -297,8 +300,7 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
return id;
}
- InternalCDOObject adapter = FSMUtil.adapt(eObject);
- 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 6a6b764..466b413 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
@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.internal.cdo.CDOAdapterImpl;
import org.eclipse.emf.internal.cdo.CDOMetaImpl;
+import org.eclipse.emf.internal.cdo.CDOViewImpl;
import org.eclipse.emf.internal.cdo.InternalCDOObject;
import java.util.Collection;
@@ -42,7 +43,7 @@ public final class FSMUtil
return state == CDOState.TRANSIENT || state == CDOState.PREPARED_ATTACH;
}
- public static InternalCDOObject adapt(Object object)
+ public static InternalCDOObject adapt(Object object, CDOViewImpl view)
{
if (object instanceof InternalCDOObject)
{
@@ -70,7 +71,7 @@ public final class FSMUtil
throw new ImplementationError("Neither InternalCDOObject nor InternalEObject: " + object.getClass().getName());
}
- public static Iterator<InternalCDOObject> iterator(Collection instances)
+ public static Iterator<InternalCDOObject> iterator(Collection instances, final CDOViewImpl view)
{
final Iterator delegate = instances.iterator();
return new Iterator<InternalCDOObject>()
@@ -81,7 +82,7 @@ public final class FSMUtil
{
while (delegate.hasNext())
{
- next = adapt(delegate.next());
+ next = adapt(delegate.next(), view);
if (next instanceof InternalCDOObject)
{
return true;