Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-11-07 04:41:52 -0500
committerEike Stepper2009-11-07 04:41:52 -0500
commit8f8228673b8b6c1007ef3644c8416272cedbf5ab (patch)
treeb815c896ec1d194a824c7abb99eb58d80fd015a1 /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util
parentb9d57f215e8203f11d09991a20bcbcdfa7127ad4 (diff)
downloadcdo-8f8228673b8b6c1007ef3644c8416272cedbf5ab.tar.gz
cdo-8f8228673b8b6c1007ef3644c8416272cedbf5ab.tar.xz
cdo-8f8228673b8b6c1007ef3644c8416272cedbf5ab.zip
[294528] Preserve CDOID for re-attached CDOObjects
https://bugs.eclipse.org/bugs/show_bug.cgi?id=294528
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java49
1 files changed, 0 insertions, 49 deletions
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 a9c7b449fd..103fa4b4af 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
@@ -14,7 +14,6 @@ package org.eclipse.emf.internal.cdo.util;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
import org.eclipse.emf.cdo.common.id.CDOID;
-import org.eclipse.emf.cdo.common.model.EMFUtil;
import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.util.InvalidObjectException;
@@ -34,11 +33,9 @@ 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.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOView;
@@ -253,52 +250,6 @@ public final class FSMUtil
}
}
- /**
- * Similar to {@link EcoreUtil#getAllProperContents(Resource, boolean)} except gives only one depth
- */
- public static Iterator<InternalCDOObject> getProperContents(final InternalCDOObject object)
- {
- final boolean isResource = object instanceof Resource;
- final CDOView cdoView = object.cdoView();
- final Iterator<EObject> delegate = object.eContents().iterator();
-
- return new Iterator<InternalCDOObject>()
- {
- private Object next;
-
- public boolean hasNext()
- {
- while (delegate.hasNext())
- {
- InternalEObject eObject = (InternalEObject)delegate.next();
-
- EStructuralFeature eContainingFeature = eObject.eContainingFeature();
- if (isResource || eObject.eDirectResource() == null
- && (eContainingFeature == null || EMFUtil.isPersistent(eContainingFeature)))
- {
- next = adapt(eObject, cdoView);
- if (next instanceof InternalCDOObject)
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
- public InternalCDOObject next()
- {
- return (InternalCDOObject)next;
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
- };
- }
-
public static Iterator<InternalCDOObject> iterator(final Iterator<?> delegate, final InternalCDOView view)
{
return new Iterator<InternalCDOObject>()

Back to the top