From 6cce3aa127779a299991bd9b5a1607f47c2eae9c Mon Sep 17 00:00:00 2001
From: Eike Stepper
Date: Fri, 17 Oct 2008 19:07:54 +0000
Subject: [249847] Store resources in a hierarchical structure
https://bugs.eclipse.org/bugs/show_bug.cgi?id=249847
---
.../provider/CDOResourceFolderItemProvider.java | 35 ++-
.../provider/CDOResourceItemProvider.java | 44 ++--
.../provider/CDOResourceNodeItemProvider.java | 38 +--
.../eresource/provider/EresourceEditPlugin.java | 32 +--
.../EresourceItemProviderAdapterFactory.java | 64 +++--
plugins/org.eclipse.emf.cdo/model/eresource.ecore | 5 +-
.../org/eclipse/emf/cdo/eresource/CDOResource.java | 105 ++++-----
.../emf/cdo/eresource/CDOResourceFolder.java | 10 +-
.../eclipse/emf/cdo/eresource/CDOResourceNode.java | 38 +--
.../emf/cdo/eresource/EresourceFactory.java | 16 +-
.../emf/cdo/eresource/EresourcePackage.java | 260 ++++++++++-----------
.../cdo/eresource/impl/CDOResourceFactoryImpl.java | 4 +-
.../cdo/eresource/impl/CDOResourceFolderImpl.java | 18 +-
.../emf/cdo/eresource/impl/CDOResourceImpl.java | 68 +++---
.../cdo/eresource/impl/CDOResourceNodeImpl.java | 147 +++++++++++-
.../cdo/eresource/impl/EresourceFactoryImpl.java | 20 +-
.../cdo/eresource/impl/EresourcePackageImpl.java | 98 +++-----
.../eresource/util/EresourceAdapterFactory.java | 42 ++--
.../emf/cdo/eresource/util/EresourceSwitch.java | 49 ++--
.../emf/internal/cdo/CDOTransactionImpl.java | 24 +-
.../org/eclipse/emf/internal/cdo/CDOViewImpl.java | 12 +-
.../org/eclipse/emf/internal/cdo/util/FSMUtil.java | 19 --
.../internal/cdo/util/ProxyResolverResource.java | 190 ---------------
.../cdo/util/ProxyResolverURIResourceMap.java | 129 ----------
24 files changed, 621 insertions(+), 846 deletions(-)
delete mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverResource.java
delete mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ProxyResolverURIResourceMap.java
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
index e9114d34bc..44ebb4e20a 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
@@ -2,7 +2,7 @@
*
+ * The following features are supported: + *
* If the meaning of the 'Resource Set' attribute isn't clear, there really should be more of a description * here... *
* - * * @return the value of the 'Resource Set' attribute. * @see #setResourceSet(ResourceSet) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_ResourceSet() @@ -57,27 +60,25 @@ public interface CDOResource extends CDOResourceNode, Resource ResourceSet getResourceSet(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet Resource Set}' - * attribute. - * - * @param value - * the new value of the 'Resource Set' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet Resource Set}' attribute. + * + * @param value the new value of the 'Resource Set' attribute. * @see #getResourceSet() * @generated */ void setResourceSet(ResourceSet value); /** - * Returns the value of the 'URI' attribute. + * Returns the value of the 'URI' attribute. + * ** If the meaning of the 'URI' attribute isn't clear, there really should be more of a description here... *
* - * * @return the value of the 'URI' attribute. * @see #setURI(URI) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_URI() - * @model dataType="org.eclipse.emf.cdo.eresource.URI" transient="true" + * @model dataType="org.eclipse.emf.cdo.eresource.URI" transient="true" volatile="true" derived="true" * @generated */ URI getURI(); @@ -94,14 +95,14 @@ public interface CDOResource extends CDOResourceNode, Resource void setURI(URI value); /** - * Returns the value of the 'Contents' containment reference list. The list contents are of type - * {@link org.eclipse.emf.ecore.EObject}. + * Returns the value of the 'Contents' containment reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EObject}. + * ** If the meaning of the 'Contents' containment reference list isn't clear, there really should be more of a * description here... *
* - * * @return the value of the 'Contents' containment reference list. * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_Contents() * @model containment="true" @@ -110,13 +111,13 @@ public interface CDOResource extends CDOResourceNode, Resource EList* If the meaning of the 'Modified' attribute isn't clear, there really should be more of a description * here... *
* - * * @return the value of the 'Modified' attribute. * @see #setModified(boolean) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_Modified() @@ -128,9 +129,7 @@ public interface CDOResource extends CDOResourceNode, Resource /** * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#isModified Modified}' attribute. * - * - * @param value - * the new value of the 'Modified' attribute. + * @param value the new value of the 'Modified' attribute. * @see #isModified() * @generated */ @@ -152,13 +151,13 @@ public interface CDOResource extends CDOResourceNode, Resource boolean isLoaded(); /** - * Returns the value of the 'Tracking Modification' attribute. + * Returns the value of the 'Tracking Modification' attribute. + * ** If the meaning of the 'Tracking Modification' attribute isn't clear, there really should be more of a * description here... *
* - * * @return the value of the 'Tracking Modification' attribute. * @see #setTrackingModification(boolean) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_TrackingModification() @@ -168,58 +167,54 @@ public interface CDOResource extends CDOResourceNode, Resource boolean isTrackingModification(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification - * Tracking Modification}' attribute. - * - * @param value - * the new value of the 'Tracking Modification' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification Tracking Modification}' attribute. + * + * @param value the new value of the 'Tracking Modification' attribute. * @see #isTrackingModification() * @generated */ void setTrackingModification(boolean value); /** - * Returns the value of the 'Errors' attribute list. The list contents are of type - * {@link org.eclipse.emf.ecore.resource.Resource.Diagnostic}. + * Returns the value of the 'Errors' attribute list. + * The list contents are of type {@link org.eclipse.emf.ecore.resource.Resource.Diagnostic}. + * ** If the meaning of the 'Errors' attribute list isn't clear, there really should be more of a description * here... *
* - * * @return the value of the 'Errors' attribute list. * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_Errors() - * @model dataType="org.eclipse.emf.cdo.eresource.Diagnostic" transient="true" changeable="false" volatile="true" - * derived="true" + * @model dataType="org.eclipse.emf.cdo.eresource.Diagnostic" transient="true" changeable="false" volatile="true" derived="true" * @generated */ EList* If the meaning of the 'Warnings' attribute list isn't clear, there really should be more of a description * here... *
* - * * @return the value of the 'Warnings' attribute list. * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_Warnings() - * @model dataType="org.eclipse.emf.cdo.eresource.Diagnostic" transient="true" changeable="false" volatile="true" - * derived="true" + * @model dataType="org.eclipse.emf.cdo.eresource.Diagnostic" transient="true" changeable="false" volatile="true" derived="true" * @generated */ EList* If the meaning of the 'Time Stamp' attribute isn't clear, there really should be more of a description * here... *
* - * * @return the value of the 'Time Stamp' attribute. * @see #setTimeStamp(long) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResource_TimeStamp() @@ -229,11 +224,9 @@ public interface CDOResource extends CDOResourceNode, Resource long getTimeStamp(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp Time Stamp}' - * attribute. - * - * @param value - * the new value of the 'Time Stamp' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp Time Stamp}' attribute. + * + * @param value the new value of the 'Time Stamp' attribute. * @see #getTimeStamp() * @generated */ diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java index 047373959b..1eaeadc6af 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java @@ -2,7 +2,7 @@ ** If the meaning of the 'Nodes' containment reference list isn't clear, there really should be more of a * description here... *
* - * * @return the value of the 'Nodes' containment reference list. * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceFolder_Nodes() * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java index beda838f38..2735131860 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java @@ -2,7 +2,7 @@ ** If the meaning of the 'Folder' container reference isn't clear, there really should be more of a * description here... *
* - * * @return the value of the 'Folder' container reference. * @see #setFolder(CDOResourceFolder) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Folder() @@ -64,23 +64,21 @@ public interface CDOResourceNode extends CDOObject CDOResourceFolder getFolder(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder Folder}' container - * reference. - * - * @param value - * the new value of the 'Folder' container reference. + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder Folder}' container reference. + * + * @param value the new value of the 'Folder' container reference. * @see #getFolder() * @generated */ void setFolder(CDOResourceFolder value); /** - * Returns the value of the 'Name' attribute. + * Returns the value of the 'Name' attribute. + * ** If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... *
* - * * @return the value of the 'Name' attribute. * @see #setName(String) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Name() @@ -101,17 +99,29 @@ public interface CDOResourceNode extends CDOObject void setName(String value); /** - * Returns the value of the 'Path' attribute. + * Returns the value of the 'Path' attribute. + * ** If the meaning of the 'Path' attribute isn't clear, there really should be more of a description here... *
* - * * @return the value of the 'Path' attribute. + * @see #setPath(String) * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Path() - * @model transient="true" changeable="false" volatile="true" derived="true" + * @model transient="true" volatile="true" derived="true" * @generated */ String getPath(); + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath Path}' attribute. + * + * @param value + * the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + } // CDOResourceNode diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java index 50e830ded4..d82ad32812 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java @@ -15,21 +15,21 @@ import org.eclipse.emf.ecore.EFactory; /** * The Factory for the model. It provides a create method for each non-abstract class of * the model. - * * @see org.eclipse.emf.cdo.eresource.EresourcePackage * @generated */ public interface EresourceFactory extends EFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * @generated */ EresourceFactory eINSTANCE = org.eclipse.emf.cdo.eresource.impl.EresourceFactoryImpl.init(); /** - * Returns a new object of class 'CDO Resource Folder'. + * Returns a new object of class 'CDO Resource Folder'. + * * * @since 2.0 * @return a new object of class 'CDO Resource Folder'. @@ -38,16 +38,16 @@ public interface EresourceFactory extends EFactory CDOResourceFolder createCDOResourceFolder(); /** - * Returns a new object of class 'CDO Resource'. - * + * Returns a new object of class 'CDO Resource'. + * * @return a new object of class 'CDO Resource'. * @generated */ CDOResource createCDOResource(); /** - * Returns the package supported by this factory. - * + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ 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 60006d6e1b..f330827263 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 @@ -25,7 +25,6 @@ import org.eclipse.emf.ecore.EReference; *- * The following features are implemented: - *
+ * The following features are implemented: + *
- * Of this package and its interdependencies, all packages which have not yet been registered by their URI values are - * first created and registered. The packages are then initialized in two steps: meta-model objects for all of the - * packages are created before any are initialized, since one package's meta-model objects may refer to those of - * another. - *
- * Invocation of this method will not affect any packages that have already been initialized. + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *
Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *
Invocation of this method will not affect any packages that have
+ * already been initialized.
+ *
*
- *
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
@@ -121,9 +117,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public static EresourcePackage init()
{
if (isInited)
- {
return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
- }
// Obtain or create and register package
EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE
@@ -215,7 +209,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EClass getCDOResource()
@@ -225,7 +218,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_ResourceSet()
@@ -235,7 +227,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_URI()
@@ -245,7 +236,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EReference getCDOResource_Contents()
@@ -255,7 +245,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_Modified()
@@ -265,7 +254,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_Loaded()
@@ -275,7 +263,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_TrackingModification()
@@ -285,7 +272,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_Errors()
@@ -295,7 +281,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_Warnings()
@@ -305,7 +290,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EAttribute getCDOResource_TimeStamp()
@@ -315,7 +299,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EDataType getResourceSet()
@@ -325,7 +308,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EDataType getURI()
@@ -335,7 +317,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EDataType getDiagnostic()
@@ -345,7 +326,6 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
public EresourceFactory getEresourceFactory()
@@ -355,23 +335,20 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its
- * first.
- *
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ *
* @generated
*/
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -402,23 +379,20 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
/**
*
- *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any
- * invocation but its first.
- *
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ *
* @generated
*/
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -434,32 +408,32 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
// Set bounds for type parameters
// Add supertypes to classes
- cdoResourceFolderEClass.getESuperTypes().add(getCDOResourceNode());
- cdoResourceEClass.getESuperTypes().add(getCDOResourceNode());
+ cdoResourceFolderEClass.getESuperTypes().add(this.getCDOResourceNode());
+ cdoResourceEClass.getESuperTypes().add(this.getCDOResourceNode());
// Initialize classes and features; add operations and parameters
initEClass(cdoResourceNodeEClass, CDOResourceNode.class, "CDOResourceNode", IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCDOResourceNode_Folder(), getCDOResourceFolder(), getCDOResourceFolder_Nodes(), "folder", null,
- 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCDOResourceNode_Folder(), this.getCDOResourceFolder(), this.getCDOResourceFolder_Nodes(),
+ "folder", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCDOResourceNode_Name(), ecorePackage.getEString(), "name", null, 0, 1, CDOResourceNode.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCDOResourceNode_Path(), ecorePackage.getEString(), "path", null, 0, 1, CDOResourceNode.class,
- IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEClass(cdoResourceFolderEClass, CDOResourceFolder.class, "CDOResourceFolder", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCDOResourceFolder_Nodes(), getCDOResourceNode(), getCDOResourceNode_Folder(), "nodes", null, 0,
- -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCDOResourceFolder_Nodes(), this.getCDOResourceNode(), this.getCDOResourceNode_Folder(), "nodes",
+ null, 0, -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cdoResourceEClass, CDOResource.class, "CDOResource", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCDOResource_ResourceSet(), getResourceSet(), "resourceSet", null, 0, 1, CDOResource.class,
+ initEAttribute(getCDOResource_ResourceSet(), this.getResourceSet(), "resourceSet", null, 0, 1, CDOResource.class,
IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getCDOResource_URI(), getURI(), "uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCDOResource_URI(), this.getURI(), "uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT,
+ IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEReference(getCDOResource_Contents(), theEcorePackage.getEObject(), null, "contents", null, 0, -1,
CDOResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -470,9 +444,9 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
initEAttribute(getCDOResource_TrackingModification(), ecorePackage.getEBoolean(), "trackingModification", null, 0,
1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEAttribute(getCDOResource_Errors(), getDiagnostic(), "errors", null, 0, -1, CDOResource.class, IS_TRANSIENT,
- IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getCDOResource_Warnings(), getDiagnostic(), "warnings", null, 0, -1, CDOResource.class,
+ initEAttribute(getCDOResource_Errors(), this.getDiagnostic(), "errors", null, 0, -1, CDOResource.class,
+ 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);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java
index b682d6a099..6ac82ece25 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java
@@ -10,6 +10,7 @@
**************************************************************************/
package org.eclipse.emf.cdo.eresource.util;
+import org.eclipse.emf.cdo.eresource.*;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
@@ -23,22 +24,21 @@ import org.eclipse.emf.ecore.EObject;
/**
* The Adapter Factory for the model. It provides an adapter createXXX
* method for each class of the model.
- *
* @see org.eclipse.emf.cdo.eresource.EresourcePackage
* @generated
*/
public class EresourceAdapterFactory extends AdapterFactoryImpl
{
/**
- * The cached model package.
- *
+ * The cached model package.
+ *
* @generated
*/
protected static EresourcePackage modelPackage;
/**
- * Creates an instance of the adapter factory.
- *
+ * Creates an instance of the adapter factory.
+ *
* @generated
*/
public EresourceAdapterFactory()
@@ -50,10 +50,10 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * Returns whether this factory is applicable for the type of the object. This implementation
+ * Returns whether this factory is applicable for the type of the object.
+ * This implementation
* returns true
if the object is either the model's package or is an instance object of the model.
- *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -72,8 +72,8 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * The switch that delegates to the createXXX
methods.
- *
+ * The switch that delegates to the createXXX
methods.
+ *
* @generated
*/
protected EresourceSwitchtarget
.
- *
- * @param target
- * the object to adapt.
+ * Creates an adapter for the target
.
+ *
+ * @param target the object to adapt.
* @return the adapter for the target
.
* @generated
*/
@@ -118,8 +117,8 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode
- * CDO Resource Node}'. This default implementation returns null so that we can
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode CDO Resource Node}'.
+ * This default implementation returns null so that we can
* easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
*
* @since 2.0
@@ -133,8 +132,8 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder
- * CDO Resource Folder}'. This default implementation returns null so that we can
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder CDO Resource Folder}'.
+ * This default implementation returns null so that we can
* easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
*
* @since 2.0
@@ -148,10 +147,9 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResource
- * CDO Resource}'. This default implementation returns null so that we can easily
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResource CDO Resource}'.
+ * This default implementation returns null so that we can easily
* ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
* @return the new adapter.
* @see org.eclipse.emf.cdo.eresource.CDOResource
* @generated
@@ -162,9 +160,9 @@ public class EresourceAdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for the default case. This default implementation returns null. This default implementation returns null.
- *
* @return the new adapter.
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
index 6075a7f16e..76ef67a35c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
@@ -19,28 +19,28 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import java.util.List;
+import org.eclipse.emf.cdo.eresource.*;
/**
* The Switch for the model's inheritance hierarchy. It supports the call
* {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX
method for each class of the model,
* starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is
* returned, which is the result of the switch.
- *
* @see org.eclipse.emf.cdo.eresource.EresourcePackage
* @generated
*/
public class EresourceSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
*
- *
* @return the first non-null result returned by a caseXXX
call.
* @generated
*/
@@ -66,7 +65,6 @@ public class EresourceSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
*
- *
* @return the first non-null result returned by a caseXXX
call.
* @generated
*/
@@ -86,7 +84,6 @@ public class EresourceSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
*
- *
* @return the first non-null result returned by a caseXXX
call.
* @generated
*/
@@ -99,9 +96,7 @@ public class EresourceSwitchnull
;
+ * @since 2.0
+ */
+ public CDOResourceFolder getOrCreateResourceFolder(Listnull
* @since 2.0
*/
- protected CDOID getResourceID(String path)
+ public CDOID getResourceID(String path)
{
if (StringUtil.isEmpty(path))
{
@@ -366,6 +367,9 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
return folderID;
}
+ /**
+ * @retrn never null
+ */
private CDOID getResourceID(CDOID folderID, String name)
{
folderID = getResourceNodeID(folderID, name);
@@ -373,6 +377,7 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
{
throw new CDOException("Can not find " + name);
}
+
return folderID;
}
@@ -496,8 +501,11 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
}
/**
+ * TODO Remove me
+ *
* @since 2.0
*/
+ @Deprecated
public CDOResourceFolder getResourceFolder(String path)
{
if (path == null)
@@ -805,7 +813,7 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
protected void cleanObject(InternalCDOObject object, InternalCDORevision revision)
{
object.cdoInternalCleanup();
-
+
object.cdoInternalSetView(this);
object.cdoInternalSetRevision(revision);
object.cdoInternalSetID(revision.getID());
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 254289eee5..2b4d43a2bb 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
@@ -28,22 +28,17 @@ import org.eclipse.emf.internal.cdo.CDOViewImpl;
import org.eclipse.emf.internal.cdo.CDOViewSetImpl;
import org.eclipse.emf.internal.cdo.InternalCDOObject;
-import org.eclipse.net4j.util.ImplementationError;
-
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import java.util.Collection;
import java.util.Iterator;
-import java.util.Map;
/**
* @author Eike Stepper
@@ -281,22 +276,8 @@ public final class FSMUtil
synchronized (resourceSet)
{
viewSet = (CDOViewSetImpl)CDOUtil.getViewSet(resourceSet);
-
if (viewSet == null)
{
- if (resourceSet instanceof ResourceSetImpl)
- {
- Map