diff options
author | Eike Stepper | 2009-07-09 05:24:38 +0000 |
---|---|---|
committer | Eike Stepper | 2009-07-09 05:24:38 +0000 |
commit | 9543ab32dd0418949ed4840422ab3e9a3ce0c114 (patch) | |
tree | 1f74d8ae7a9b1dac5d49acc2f11198e961da4f92 /plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3 | |
parent | 09070c072a8415314e9b2563471af0ce89939e2e (diff) | |
download | cdo-9543ab32dd0418949ed4840422ab3e9a3ce0c114.tar.gz cdo-9543ab32dd0418949ed4840422ab3e9a3ce0c114.tar.xz cdo-9543ab32dd0418949ed4840422ab3e9a3ce0c114.zip |
[282929] Model1.ecore changes for hibernate store tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282929
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3')
2 files changed, 13 insertions, 21 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java index e356151e4e..11e6184989 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java @@ -71,15 +71,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * Creates, registers, and initializes the <b>Package</b> 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. * <p> - * 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. - * <p> - * Invocation of this method will not affect any packages that have already been initialized. <!-- begin-user-doc --> + * This method is used to initialize {@link Model3Package#eINSTANCE} when that field is accessed. Clients should not + * invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #eNS_URI @@ -93,8 +87,8 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI); // Obtain or create and register package - Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE - .getEPackage(eNS_URI) + Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new Model3PackageImpl()); isInited = true; @@ -118,6 +112,8 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package // Mark meta-data to indicate it can't be changed theModel3Package.freeze(); + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(Model3Package.eNS_URI, theModel3Package); return theModel3Package; } diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java index 29ca81a018..d6b24fab31 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java @@ -63,16 +63,10 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * Creates, registers, and initializes the <b>Package</b> 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. * <p> - * 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. - * <p> - * Invocation of this method will not affect any packages that have already been initialized. <!-- begin-user-doc --> - * <!-- end-user-doc --> + * This method is used to initialize {@link SubpackagePackage#eINSTANCE} when that field is accessed. Clients should + * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc + * --> <!-- end-user-doc --> * * @see #eNS_URI * @see #createPackageContents() @@ -85,8 +79,8 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac return (SubpackagePackage)EPackage.Registry.INSTANCE.getEPackage(SubpackagePackage.eNS_URI); // Obtain or create and register package - SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE - .getEPackage(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) + SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new SubpackagePackageImpl()); isInited = true; @@ -110,6 +104,8 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac // Mark meta-data to indicate it can't be changed theSubpackagePackage.freeze(); + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(SubpackagePackage.eNS_URI, theSubpackagePackage); return theSubpackagePackage; } |