summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-24 02:38:12 (EDT)
committerEike Stepper2007-07-24 02:38:12 (EDT)
commit808df72cd1f7b7d8c39dcfbd5f2c805814227bc1 (patch)
tree6535aa33c5bc0ec8f4c431980ce1b74d3674b5c5
parentbb3bdf5dd43806174460d9f83fb0db38dfe4b5e4 (diff)
downloadcdo-808df72cd1f7b7d8c39dcfbd5f2c805814227bc1.zip
cdo-808df72cd1f7b7d8c39dcfbd5f2c805814227bc1.tar.gz
cdo-808df72cd1f7b7d8c39dcfbd5f2c805814227bc1.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java48
3 files changed, 52 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index 676c113..f401b6f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -607,7 +607,7 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
if (object instanceof CDOAdapterImpl)
{
CDOAdapterImpl adapter = (CDOAdapterImpl)object;
- System.out.println("RESOLVING");
+ System.out.println("RESOLVING"); // XXX
adapter.cdoInternalResolveRevision();
return adapter.getTarget();
}
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 a1c5be8..2751d62 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
@@ -54,7 +54,11 @@ public final class FSMUtil
if (object instanceof EModelElement || object instanceof EGenericType)
{
InternalEObject eObject = (InternalEObject)object;
- eObject = (InternalEObject)EcoreUtil.resolve(eObject, view.getResourceSet());
+ if (eObject.eIsProxy())
+ {
+ eObject = (InternalEObject)EcoreUtil.resolve(eObject, view.getResourceSet());
+ }
+
CDOID id = view.getSession().lookupMetaInstanceID(eObject);
if (id != null)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
index bed252d..fd1ee3a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/GenUtil.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.util;
+import org.eclipse.net4j.util.StringUtil;
+
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -23,12 +25,53 @@ public final class GenUtil
{
}
- public static String getUpperFeatureName(String featureName)
+ /**
+ * @see GenFeatureImpl#getUpperName
+ */
+ public static String getFeatureUpperName(String featureName)
{
return format(featureName, '_', null, false, true).toUpperCase();
}
/**
+ * @see GenFeatureImpl#getGetAccessor
+ */
+ public static String getFeatureGetterName(String featureName, boolean isBooleanType)
+ {
+ String capName = StringUtil.cap(featureName);
+ // if (isMapEntryFeature())
+ // return "getTyped" + capName;
+ String result = isBooleanType ? "is" + capName : "get" + ("Class".equals(capName) ? "Class_" : capName);
+
+ // if (isListType() && !isFeatureMapType() && !isMapType() &&
+ // getGenModel().isArrayAccessors())
+ // {
+ // result += "List";
+ // }
+
+ // GenClass rootImplementsInterface =
+ // getGenModel().getRootImplementsInterfaceGenClass();
+ // GenClass context = getContext();
+ // if (rootImplementsInterface != null &&
+ // !rootImplementsInterface.isEObject())
+ // {
+ // for (GenOperation genOperation :
+ // rootImplementsInterface.getAllGenOperations())
+ // {
+ // if (genOperation.getName().equals(result) &&
+ // genOperation.getGenParameters().isEmpty() &&
+ // !genOperation.getType(context).equals(getType(context)))
+ // {
+ // result = result + "_";
+ // break;
+ // }
+ // }
+ // }
+
+ return result;
+ }
+
+ /**
* Formats a name by parsing it into words separated by underscores and/or
* mixed-casing and then recombining them using the specified separator. A
* prefix can also be given to be recognized as a separate word or to be
@@ -57,7 +100,8 @@ public final class GenUtil
}
}
- if (name.length() != 0) parsedName.addAll(parseName(name, '_'));
+ if (name.length() != 0)
+ parsedName.addAll(parseName(name, '_'));
StringBuilder result = new StringBuilder();