Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-26 14:16:13 -0400
committerEike Stepper2008-10-26 14:16:13 -0400
commitd36c37f6fecde8ffc33e711c1a80991ae85f436d (patch)
tree02b7a88f7c939f836cc5704976c6e541c105e23a /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util
parent80284ffd5f23bbaddadaae074647351e5c00a7f8 (diff)
downloadcdo-d36c37f6fecde8ffc33e711c1a80991ae85f436d.tar.gz
cdo-d36c37f6fecde8ffc33e711c1a80991ae85f436d.tar.xz
cdo-d36c37f6fecde8ffc33e711c1a80991ae85f436d.zip
[252118] SessionConfig: Eager used instead of Lazy
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252118
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/CDOPackageRegistryImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java8
2 files changed, 2 insertions, 14 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOPackageRegistryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOPackageRegistryImpl.java
index 054c13c2a4..029dd9573c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOPackageRegistryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/CDOPackageRegistryImpl.java
@@ -39,7 +39,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
import java.text.MessageFormat;
@@ -124,13 +123,8 @@ public class CDOPackageRegistryImpl extends EPackageRegistryImpl implements CDOP
tracer.format("Registering package for {0}", key);
}
- if (EMFUtil.isDynamicEPackage(value))
- {
- EPackageImpl ePackage = (EPackageImpl)value;
- ModelUtil.prepareDynamicEPackage(ePackage);
- }
-
EPackage ePackage = (EPackage)value;
+ EMFUtil.prepareDynamicEPackage(ePackage);
CDOPackage cdoPackage = ModelUtil.getCDOPackage(ePackage, session.getPackageManager());
CDOIDMetaRange metaIDRange = cdoPackage.getTopLevelPackage().getMetaIDRange();
((InternalCDOPackage)cdoPackage).setPersistent(metaIDRange != null && !metaIDRange.isTemporary());
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
index e883e078a4..5c7d5bc4cc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java
@@ -32,7 +32,6 @@ import org.eclipse.emf.cdo.spi.common.InternalCDOPackage;
import org.eclipse.emf.cdo.util.CDOPackageRegistry;
import org.eclipse.emf.cdo.util.EMFUtil;
-import org.eclipse.emf.internal.cdo.CDOFactoryImpl;
import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
@@ -354,7 +353,7 @@ public final class ModelUtil
private static EPackageImpl prepareDynamicEPackage(EPackageImpl ePackage, String nsURI)
{
- prepareDynamicEPackage(ePackage);
+ EMFUtil.prepareDynamicEPackage(ePackage);
EPackageImpl result = ObjectUtil.equals(ePackage.getNsURI(), nsURI) ? ePackage : null;
for (EPackage subPackage : ePackage.getESubpackages())
{
@@ -368,11 +367,6 @@ public final class ModelUtil
return result;
}
- public static void prepareDynamicEPackage(EPackageImpl ePackage)
- {
- ePackage.setEFactoryInstance(new CDOFactoryImpl(ePackage));
- }
-
public static CDOClassRef createClassRef(EClassifier classifier)
{
if (classifier instanceof EClass)

Back to the top