summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-17 04:15:21 (EST)
committerEike Stepper2007-12-17 04:15:21 (EST)
commitfa0f7794dd9e7e979a4b4ed3972f2179e5eb1281 (patch)
tree9e4bd4188e1ed40e9b8c7925d2422bf7d76da13c
parent43e0ea1a154a43c38b92564750839a2796b546bd (diff)
downloadcdo-fa0f7794dd9e7e979a4b4ed3972f2179e5eb1281.zip
cdo-fa0f7794dd9e7e979a4b4ed3972f2179e5eb1281.tar.gz
cdo-fa0f7794dd9e7e979a4b4ed3972f2179e5eb1281.tar.bz2
[213150] Migrate CDO to EMF 2.4M4
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213150
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/plugin.properties1
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/model/eresource.ecore4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResource.java27
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java31
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java44
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java15
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java15
8 files changed, 148 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
index adbc2da..0de4724 100644
--- a/plugins/org.eclipse.emf.cdo.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
@@ -48,3 +48,4 @@ _UI_Unknown_feature = Unspecified
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+_UI_CDOResource_timeStamp_feature = Time Stamp
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
index 849f1cf..a985a19 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
@@ -63,6 +63,7 @@ public class CDOResourceItemProvider extends ItemProviderAdapter implements IEdi
addModifiedPropertyDescriptor(object);
addLoadedPropertyDescriptor(object);
addTrackingModificationPropertyDescriptor(object);
+ addTimeStampPropertyDescriptor(object);
addPathPropertyDescriptor(object);
}
return itemPropertyDescriptors;
@@ -126,6 +127,20 @@ public class CDOResourceItemProvider extends ItemProviderAdapter implements IEdi
}
/**
+ * This adds a property descriptor for the Time Stamp feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTimeStampPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory)
+ .getRootAdapterFactory(), getResourceLocator(), getString("_UI_CDOResource_timeStamp_feature"), getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOResource_timeStamp_feature", "_UI_CDOResource_type"),
+ EresourcePackage.Literals.CDO_RESOURCE__TIME_STAMP, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
* This adds a property descriptor for the Path feature. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -215,6 +230,7 @@ public class CDOResourceItemProvider extends ItemProviderAdapter implements IEdi
case EresourcePackage.CDO_RESOURCE__TRACKING_MODIFICATION:
case EresourcePackage.CDO_RESOURCE__ERRORS:
case EresourcePackage.CDO_RESOURCE__WARNINGS:
+ case EresourcePackage.CDO_RESOURCE__TIME_STAMP:
case EresourcePackage.CDO_RESOURCE__PATH:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
diff --git a/plugins/org.eclipse.emf.cdo/model/eresource.ecore b/plugins/org.eclipse.emf.cdo/model/eresource.ecore
index 6e82005..bde9f11 100644
--- a/plugins/org.eclipse.emf.cdo/model/eresource.ecore
+++ b/plugins/org.eclipse.emf.cdo/model/eresource.ecore
@@ -8,7 +8,7 @@
transient="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uRI" eType="#//URI" transient="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="contents" upperBound="-1"
- eType="ecore:EClass ../../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="modified" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
transient="true"/>
@@ -20,6 +20,8 @@
eType="#//Diagnostic" transient="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="warnings" upperBound="-1"
eType="#//Diagnostic" transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="timeStamp" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//ELong"
+ transient="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="ResourceSet" instanceClassName="org.eclipse.emf.ecore.resource.ResourceSet"
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResource.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResource.java
index ccb05a8..ab6eaee 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResource.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResource.java
@@ -220,6 +220,33 @@ public interface CDOResource extends EresourceObject
EList<Diagnostic> getWarnings();
/**
+ * Returns the value of the '<em><b>Time Stamp</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Time Stamp</em>' attribute isn't clear, there really should be more of a description
+ * here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Time Stamp</em>' attribute.
+ * @see #setTimeStamp(long)
+ * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_TimeStamp()
+ * @model transient="true"
+ * @generated
+ */
+ long getTimeStamp();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp <em>Time Stamp</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Time Stamp</em>' attribute.
+ * @see #getTimeStamp()
+ * @generated
+ */
+ void setTimeStamp(long value);
+
+ /**
* Returns the value of the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Path</em>' attribute isn't clear, there really should be more of a description
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java
index 23a2e59..89caeab 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java
@@ -134,12 +134,20 @@ public interface EresourcePackage extends EPackage
int CDO_RESOURCE__WARNINGS = 7;
/**
+ * The feature id for the '<em><b>Time Stamp</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CDO_RESOURCE__TIME_STAMP = 8;
+
+ /**
* The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int CDO_RESOURCE__PATH = 8;
+ int CDO_RESOURCE__PATH = 9;
/**
* The number of structural features of the '<em>CDO Resource</em>' class. <!-- begin-user-doc --> <!--
@@ -148,7 +156,7 @@ public interface EresourcePackage extends EPackage
* @generated
* @ordered
*/
- int CDO_RESOURCE_FEATURE_COUNT = 9;
+ int CDO_RESOURCE_FEATURE_COUNT = 10;
/**
* The meta object id for the '<em>Resource Set</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -276,6 +284,17 @@ public interface EresourcePackage extends EPackage
EAttribute getCDOResource_Warnings();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp <em>Time Stamp</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Time Stamp</em>'.
+ * @see org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp()
+ * @see #getCDOResource()
+ * @generated
+ */
+ EAttribute getCDOResource_TimeStamp();
+
+ /**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getPath <em>Path</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -416,6 +435,14 @@ public interface EresourcePackage extends EPackage
EAttribute CDO_RESOURCE__WARNINGS = eINSTANCE.getCDOResource_Warnings();
/**
+ * The meta object literal for the '<em><b>Time Stamp</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute CDO_RESOURCE__TIME_STAMP = eINSTANCE.getCDOResource_TimeStamp();
+
+ /**
* The meta object literal for the '<em><b>Path</b></em>' attribute feature. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
index fa66a13..f6caa1d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -87,6 +86,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected CDOResourceImpl()
@@ -96,6 +96,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -106,6 +107,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -116,6 +118,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public ResourceSet getResourceSet()
@@ -125,6 +128,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void setResourceSet(ResourceSet newResourceSet)
@@ -134,6 +138,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public URI getURI()
@@ -176,6 +181,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public boolean isModified()
@@ -185,6 +191,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void setModified(boolean newModified)
@@ -194,6 +201,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public boolean isLoaded()
@@ -203,6 +211,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void setLoaded(boolean newLoaded)
@@ -212,6 +221,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public boolean isTrackingModification()
@@ -221,6 +231,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public void setTrackingModification(boolean newTrackingModification)
@@ -230,6 +241,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -240,6 +252,7 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -250,6 +263,27 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public long getTimeStamp()
+ {
+ return ((Long)eGet(EresourcePackage.Literals.CDO_RESOURCE__TIME_STAMP, true)).longValue();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setTimeStamp(long newTimeStamp)
+ {
+ eSet(EresourcePackage.Literals.CDO_RESOURCE__TIME_STAMP, new Long(newTimeStamp));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public String getPath()
@@ -355,6 +389,14 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
/**
* @ADDED
*/
+ public void delete(Map<?, ?> options) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @ADDED
+ */
public void attached(EObject object)
{
InternalCDOObject legacy = getLegacyWrapper(object);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
index 32dba51..7717742 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
@@ -204,12 +204,22 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCDOResource_TimeStamp()
+ {
+ return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public EAttribute getCDOResource_Path()
{
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(8);
+ return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(9);
}
/**
@@ -275,6 +285,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
createEAttribute(cdoResourceEClass, CDO_RESOURCE__TRACKING_MODIFICATION);
createEAttribute(cdoResourceEClass, CDO_RESOURCE__ERRORS);
createEAttribute(cdoResourceEClass, CDO_RESOURCE__WARNINGS);
+ createEAttribute(cdoResourceEClass, CDO_RESOURCE__TIME_STAMP);
createEAttribute(cdoResourceEClass, CDO_RESOURCE__PATH);
// Create data types
@@ -335,6 +346,8 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCDOResource_Warnings(), this.getDiagnostic(), "warnings", null, 0, -1, CDOResource.class,
IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCDOResource_TimeStamp(), theEcorePackage.getELong(), "timeStamp", null, 0, 1, CDOResource.class,
+ IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCDOResource_Path(), ecorePackage.getEString(), "path", null, 0, 1, CDOResource.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java
index b98be7e..53aab96 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java
@@ -91,6 +91,21 @@ final class ProxyResolverResource implements Resource
throw new UnsupportedOperationException();
}
+ public void delete(Map<?, ?> options) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getTimeStamp()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setTimeStamp(long timeStamp)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public EList<Diagnostic> getWarnings()
{
throw new UnsupportedOperationException();