summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-20 07:16:29 (EDT)
committerEike Stepper2007-10-20 07:16:29 (EDT)
commit38ed74fff48ea97b22b36725e3f6920177f8202b (patch)
tree32152e7a2ebc40dd60ddc2ad18c54ad7ab7109ce
parent8fc3d4387d8e2c24b444ca62042b2970b4605ca8 (diff)
downloadcdo-38ed74fff48ea97b22b36725e3f6920177f8202b.zip
cdo-38ed74fff48ea97b22b36725e3f6920177f8202b.tar.gz
cdo-38ed74fff48ea97b22b36725e3f6920177f8202b.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ModelUtil.java21
1 files changed, 6 insertions, 15 deletions
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 a3a2a5c..44a5fca 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
@@ -193,14 +193,12 @@ public final class ModelUtil
boolean containment = EMFUtil.isContainment(eFeature);
CDOFeatureImpl cdoFeature = new CDOFeatureImpl(containingClass, featureID, name, new CDOClassProxy(classRef,
packageManager), many, containment);
- if (MODEL.isEnabled())
+
+ EReference opposite = eFeature.getEOpposite();
+ if (MODEL.isEnabled() && opposite != null)
{
- EReference opposite = eFeature.getEOpposite();
- MODEL.format(
- "Reference info: typePackage={0}, typeID={1}, oppositePackage={2}, oppositeClass={3}, oppositeID={4}",
- eFeature.getEType().getEPackage().getNsURI(), eFeature.getEType().getClassifierID(),
- opposite == null ? "null" : opposite.getEContainingClass().getEPackage().getNsURI(), opposite == null ? "0"
- : opposite.getEContainingClass().getClassifierID(), opposite == null ? "0" : opposite.getFeatureID());
+ MODEL.format("Opposite info: package={2}, class={3}, id={4}", opposite.getEContainingClass().getEPackage()
+ .getNsURI(), opposite.getEContainingClass().getName(), opposite.getName());
}
return cdoFeature;
@@ -212,14 +210,7 @@ public final class ModelUtil
String name = eFeature.getName();
CDOTypeImpl type = getCDOType(eFeature);
boolean many = EMFUtil.isMany(eFeature);
- CDOFeatureImpl cdoFeature = new CDOFeatureImpl(containingClass, featureID, name, type, many);
- if (MODEL.isEnabled())
- {
- MODEL.format("Attribute info: typePackage={0}, typeID={1}", eFeature.getEType().getEPackage().getNsURI(),
- eFeature.getEType().getClassifierID());
- }
-
- return cdoFeature;
+ return new CDOFeatureImpl(containingClass, featureID, name, type, many);
}
public static EPackage getEPackage(CDOPackageImpl cdoPackage, CDOPackageRegistryImpl packageRegistry)