From 0d0da313023148b4e977bd282d5b1074a0607f78 Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Mon, 7 Apr 2008 08:31:39 +0000 Subject: Regenerated for latest EMF 2.4 --- .../provider/CDOResourceItemProvider.java | 3 +- .../EresourceItemProviderAdapterFactory.java | 53 +++++++++-- plugins/org.eclipse.emf.cdo.tests.mango/.classpath | 2 +- .../org.eclipse.emf.cdo.tests.model1/.classpath | 2 +- .../model/model1.genmodel | 8 +- .../model/model2.genmodel | 2 +- .../emf/cdo/tests/model2/Model2Factory.java | 26 +++--- .../emf/cdo/tests/model2/Model2Package.java | 104 ++++++++++----------- .../emf/cdo/tests/model2/SpecialPurchaseOrder.java | 29 +++--- .../cdo/tests/model2/impl/Model2FactoryImpl.java | 41 ++++---- .../cdo/tests/model2/impl/Model2PackageImpl.java | 93 ++++++++---------- .../model2/impl/SpecialPurchaseOrderImpl.java | 30 +++--- .../tests/model2/util/Model2AdapterFactory.java | 76 +++++++-------- .../emf/cdo/tests/model2/util/Model2Switch.java | 100 +++++++++----------- .../org.eclipse.emf.cdo/model/resource.genmodel | 3 +- .../cdo/eresource/impl/EresourcePackageImpl.java | 27 ++---- .../emf/cdo/eresource/util/EresourceSwitch.java | 5 +- 17 files changed, 297 insertions(+), 307 deletions(-) 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 88076e7e10..02d2dad4b3 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 @@ -19,6 +19,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -264,7 +265,7 @@ public class CDOResourceItemProvider extends ItemProviderAdapter implements IEdi @Override public ResourceLocator getResourceLocator() { - return EresourceEditPlugin.INSTANCE; + return ((IChildCreationExtender)adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java index 62bdee4e03..c6cf41d0ae 100644 --- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java @@ -10,15 +10,20 @@ **************************************************************************/ package org.eclipse.emf.cdo.eresource.provider; +import org.eclipse.emf.cdo.eresource.EresourcePackage; import org.eclipse.emf.cdo.eresource.util.EresourceAdapterFactory; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ChildCreationExtenderManager; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IDisposable; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -29,6 +34,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import java.util.ArrayList; import java.util.Collection; +import java.util.List; /** * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this @@ -39,7 +45,7 @@ import java.util.Collection; * @generated */ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory implements ComposeableAdapterFactory, - IChangeNotifier, IDisposable + IChangeNotifier, IDisposable, IChildCreationExtender { /** * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * @generated + */ + protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager( + EresourceEditPlugin.INSTANCE, EresourcePackage.eNS_URI); + /** * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. @@ -158,7 +172,7 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory if (isFactoryForType(type)) { Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || ((Class)type).isInstance(adapter)) + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { return adapter; } @@ -167,6 +181,36 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory return null; } + /** + * + * + * @generated + */ + public List getChildCreationExtenders() + { + return childCreationExtenderManager.getChildCreationExtenders(); + } + + /** + * + * + * @generated + */ + public Collection getNewChildDescriptors(Object object, EditingDomain editingDomain) + { + return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain); + } + + /** + * + * + * @generated + */ + public ResourceLocator getResourceLocator() + { + return childCreationExtenderManager; + } + /** * This adds a listener. * @@ -210,10 +254,7 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory */ public void dispose() { - if (cdoResourceItemProvider != null) - { - cdoResourceItemProvider.dispose(); - } + if (cdoResourceItemProvider != null) cdoResourceItemProvider.dispose(); } } diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/.classpath b/plugins/org.eclipse.emf.cdo.tests.mango/.classpath index 64c5e31b7a..304e86186a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.mango/.classpath +++ b/plugins/org.eclipse.emf.cdo.tests.mango/.classpath @@ -1,7 +1,7 @@ + - diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/.classpath b/plugins/org.eclipse.emf.cdo.tests.model1/.classpath index 64c5e31b7a..304e86186a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/.classpath +++ b/plugins/org.eclipse.emf.cdo.tests.model1/.classpath @@ -1,7 +1,7 @@ + - diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.genmodel b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.genmodel index 9a8f3dd7cf..4462c9bb3d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.genmodel +++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.genmodel @@ -9,7 +9,12 @@ model1.ecore CDO=org.eclipse.emf.cdo + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="model1.ecore#/"> + + + + + @@ -52,6 +57,7 @@ + diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.genmodel b/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.genmodel index 62f5b343e2..55e93bdd70 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.genmodel +++ b/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.genmodel @@ -9,7 +9,7 @@ model2.ecore CDO=org.eclipse.emf.cdo + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="model2.ecore#/"> diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java index 5aa13b9c93..5daf55258c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java @@ -2,46 +2,42 @@ * * * - * $Id: Model2Factory.java,v 1.1 2008-04-07 07:36:36 estepper Exp $ + * $Id: Model2Factory.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2; import org.eclipse.emf.ecore.EFactory; /** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * + * The Factory for the model. It provides a create method for each non-abstract class of + * the model. + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package * @generated */ public interface Model2Factory extends EFactory { /** - * The singleton instance of the factory. - * - * + * The singleton instance of the factory. + * * @generated */ Model2Factory eINSTANCE = org.eclipse.emf.cdo.tests.model2.impl.Model2FactoryImpl.init(); /** - * Returns a new object of class 'Special Purchase Order'. - * - * + * Returns a new object of class 'Special Purchase Order'. + * * @return a new object of class 'Special Purchase Order'. * @generated */ SpecialPurchaseOrder createSpecialPurchaseOrder(); /** - * Returns the package supported by this factory. - * - * + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ Model2Package getModel2Package(); -} //Model2Factory +} // Model2Factory diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java index 11afaba206..fdc9b018d5 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java @@ -2,7 +2,7 @@ * * * - * $Id: Model2Package.java,v 1.1 2008-04-07 07:36:36 estepper Exp $ + * $Id: Model2Package.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2; @@ -13,16 +13,15 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; /** - * - * The Package for the model. - * It contains accessors for the meta objects to represent + * The Package for the model. It contains accessors for the meta objects to represent * * + * * @see org.eclipse.emf.cdo.tests.model2.Model2Factory * @model kind="package" * @generated @@ -30,41 +29,37 @@ import org.eclipse.emf.ecore.EPackage; public interface Model2Package extends EPackage { /** - * The package name. - * - * + * The package name. + * * @generated */ String eNAME = "model2"; /** - * The package namespace URI. - * - * + * The package namespace URI. + * * @generated */ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model2/1.0.0"; /** - * The package namespace name. - * - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "model2"; /** - * The singleton instance of the package. - * - * + * The singleton instance of the package. + * * @generated */ Model2Package eINSTANCE = org.eclipse.emf.cdo.tests.model2.impl.Model2PackageImpl.init(); /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl Special Purchase Order}' class. - * - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl Special Purchase Order}' + * class. + * * @see org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl * @see org.eclipse.emf.cdo.tests.model2.impl.Model2PackageImpl#getSpecialPurchaseOrder() * @generated @@ -72,45 +67,43 @@ public interface Model2Package extends EPackage int SPECIAL_PURCHASE_ORDER = 0; /** - * The feature id for the 'Order Details' containment reference list. - * + * The feature id for the 'Order Details' containment reference list. * + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__ORDER_DETAILS = Model1Package.PURCHASE_ORDER__ORDER_DETAILS; /** - * The feature id for the 'Date' attribute. - * - * + * The feature id for the 'Date' attribute. + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__DATE = Model1Package.PURCHASE_ORDER__DATE; /** - * The feature id for the 'Supplier' reference. - * - * + * The feature id for the 'Supplier' reference. + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__SUPPLIER = Model1Package.PURCHASE_ORDER__SUPPLIER; /** - * The feature id for the 'Discount Code' attribute. - * - * + * The feature id for the 'Discount Code' attribute. + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__DISCOUNT_CODE = Model1Package.PURCHASE_ORDER_FEATURE_COUNT + 0; /** - * The number of structural features of the 'Special Purchase Order' class. - * - * + * The number of structural features of the 'Special Purchase Order' class. + * * @generated * @ordered */ @@ -118,8 +111,8 @@ public interface Model2Package extends EPackage /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder Special Purchase Order}'. - * - * + * + * * @return the meta object for class 'Special Purchase Order'. * @see org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder * @generated @@ -128,8 +121,8 @@ public interface Model2Package extends EPackage /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode Discount Code}'. - * - * + * + * * @return the meta object for the attribute 'Discount Code'. * @see org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode() * @see #getSpecialPurchaseOrder() @@ -138,32 +131,31 @@ public interface Model2Package extends EPackage EAttribute getSpecialPurchaseOrder_DiscountCode(); /** - * Returns the factory that creates the instances of the model. - * - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ Model2Factory getModel2Factory(); /** - * - * Defines literals for the meta objects that represent + * Defines literals for the meta objects that represent * * + * * @generated */ interface Literals { /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl Special Purchase Order}' class. - * - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl Special Purchase Order}' + * class. + * * @see org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl * @see org.eclipse.emf.cdo.tests.model2.impl.Model2PackageImpl#getSpecialPurchaseOrder() * @generated @@ -171,13 +163,13 @@ public interface Model2Package extends EPackage EClass SPECIAL_PURCHASE_ORDER = eINSTANCE.getSpecialPurchaseOrder(); /** - * The meta object literal for the 'Discount Code' attribute feature. - * + * The meta object literal for the 'Discount Code' attribute feature. * + * * @generated */ EAttribute SPECIAL_PURCHASE_ORDER__DISCOUNT_CODE = eINSTANCE.getSpecialPurchaseOrder_DiscountCode(); } -} //Model2Package +} // Model2Package diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/SpecialPurchaseOrder.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/SpecialPurchaseOrder.java index 40f894075a..d76f142edc 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/SpecialPurchaseOrder.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/SpecialPurchaseOrder.java @@ -2,24 +2,22 @@ * * * - * $Id: SpecialPurchaseOrder.java,v 1.1 2008-04-07 07:36:36 estepper Exp $ + * $Id: SpecialPurchaseOrder.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2; import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; /** - * - * A representation of the model object 'Special Purchase Order'. - * - * + * A representation of the model object 'Special Purchase Order'. *

* The following features are supported: *

*

- * + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getSpecialPurchaseOrder() * @model * @generated @@ -27,13 +25,13 @@ import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; public interface SpecialPurchaseOrder extends PurchaseOrder { /** - * Returns the value of the 'Discount Code' attribute. - * + * Returns the value of the 'Discount Code' attribute. *

- * If the meaning of the 'Discount Code' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the 'Discount Code' attribute isn't clear, there really should be more of a + * description here... *

* + * * @return the value of the 'Discount Code' attribute. * @see #setDiscountCode(String) * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getSpecialPurchaseOrder_DiscountCode() @@ -43,10 +41,11 @@ public interface SpecialPurchaseOrder extends PurchaseOrder String getDiscountCode(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode Discount Code}' attribute. - * - * - * @param value the new value of the 'Discount Code' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode Discount Code}' + * attribute. + * + * @param value + * the new value of the 'Discount Code' attribute. * @see #getDiscountCode() * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java index 558c5ba65a..c51ea12ce4 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java @@ -2,32 +2,30 @@ * * * - * $Id: Model2FactoryImpl.java,v 1.1 2008-04-07 07:36:37 estepper Exp $ + * $Id: Model2FactoryImpl.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2.impl; -import org.eclipse.emf.cdo.tests.model2.*; +import org.eclipse.emf.cdo.tests.model2.Model2Factory; +import org.eclipse.emf.cdo.tests.model2.Model2Package; +import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; - import org.eclipse.emf.ecore.impl.EFactoryImpl; - import org.eclipse.emf.ecore.plugin.EcorePlugin; /** - * - * An implementation of the model Factory. - * + * An implementation of the model Factory. + * * @generated */ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory { /** - * Creates the default factory implementation. - * - * + * Creates the default factory implementation. + * * @generated */ public static Model2Factory init() @@ -49,9 +47,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * Creates an instance of the factory. - * - * + * Creates an instance of the factory. + * * @generated */ public Model2FactoryImpl() @@ -60,8 +57,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * - * + * + * * @generated */ @Override @@ -77,8 +74,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * - * + * + * * @generated */ public SpecialPurchaseOrder createSpecialPurchaseOrder() @@ -88,8 +85,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * - * + * + * * @generated */ public Model2Package getModel2Package() @@ -98,8 +95,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * - * + * + * * @deprecated * @generated */ @@ -109,4 +106,4 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory return Model2Package.eINSTANCE; } -} //Model2FactoryImpl +} // Model2FactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java index a4cac858ae..27aa7b55ec 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java @@ -2,12 +2,11 @@ * * * - * $Id: Model2PackageImpl.java,v 1.1 2008-04-07 07:36:37 estepper Exp $ + * $Id: Model2PackageImpl.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2.impl; import org.eclipse.emf.cdo.tests.model1.Model1Package; - import org.eclipse.emf.cdo.tests.model2.Model2Factory; import org.eclipse.emf.cdo.tests.model2.Model2Package; import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; @@ -15,34 +14,30 @@ import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; - import org.eclipse.emf.ecore.impl.EPackageImpl; /** - * - * An implementation of the model Package. - * + * An implementation of the model Package. + * * @generated */ public class Model2PackageImpl extends EPackageImpl implements Model2Package { /** - * - * + * + * * @generated */ private EClass specialPurchaseOrderEClass = null; /** * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI value. + *

+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. + * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.eclipse.emf.cdo.tests.model2.Model2Package#eNS_URI * @see #init() @@ -54,29 +49,25 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @generated */ private static boolean isInited = false; /** - * 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. - * + * 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() @@ -109,8 +100,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @generated */ public EClass getSpecialPurchaseOrder() @@ -119,8 +110,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @generated */ public EAttribute getSpecialPurchaseOrder_DiscountCode() @@ -129,8 +120,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @generated */ public Model2Factory getModel2Factory() @@ -139,17 +130,16 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @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() @@ -163,17 +153,16 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * - * + * + * * @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() @@ -207,4 +196,4 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package createResource(eNS_URI); } -} //Model2PackageImpl +} // Model2PackageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/SpecialPurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/SpecialPurchaseOrderImpl.java index f238b1298c..6b00a25416 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/SpecialPurchaseOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/SpecialPurchaseOrderImpl.java @@ -2,35 +2,33 @@ * * * - * $Id: SpecialPurchaseOrderImpl.java,v 1.1 2008-04-07 07:36:36 estepper Exp $ + * $Id: SpecialPurchaseOrderImpl.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2.impl; import org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl; - import org.eclipse.emf.cdo.tests.model2.Model2Package; import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; import org.eclipse.emf.ecore.EClass; /** - * - * An implementation of the model object 'Special Purchase Order'. - * + * An implementation of the model object 'Special Purchase Order'. *

* The following features are implemented: *

*

- * + * * @generated */ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements SpecialPurchaseOrder { /** - * - * + * + * * @generated */ protected SpecialPurchaseOrderImpl() @@ -39,8 +37,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * - * + * + * * @generated */ @Override @@ -50,8 +48,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * - * + * + * * @generated */ public String getDiscountCode() @@ -60,8 +58,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * - * + * + * * @generated */ public void setDiscountCode(String newDiscountCode) @@ -69,4 +67,4 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci eSet(Model2Package.Literals.SPECIAL_PURCHASE_ORDER__DISCOUNT_CODE, newDiscountCode); } -} //SpecialPurchaseOrderImpl +} // SpecialPurchaseOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java index f1f74aa694..fd4931fbbc 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java @@ -2,44 +2,39 @@ * * * - * $Id: Model2AdapterFactory.java,v 1.1 2008-04-07 07:36:37 estepper Exp $ + * $Id: Model2AdapterFactory.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2.util; import org.eclipse.emf.cdo.tests.model1.Order; import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; - -import org.eclipse.emf.cdo.tests.model2.*; +import org.eclipse.emf.cdo.tests.model2.Model2Package; +import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; - import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - import org.eclipse.emf.ecore.EObject; /** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * + * The Adapter Factory for the model. It provides an adapter createXXX + * method for each class of the model. + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package * @generated */ public class Model2AdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * - * + * The cached model package. + * * @generated */ protected static Model2Package modelPackage; /** - * Creates an instance of the adapter factory. - * - * + * Creates an instance of the adapter factory. + * * @generated */ public Model2AdapterFactory() @@ -51,10 +46,10 @@ public class Model2AdapterFactory extends AdapterFactoryImpl } /** - * 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. - * + * 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 */ @@ -73,9 +68,8 @@ public class Model2AdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the createXXX methods. - * - * + * The switch that delegates to the createXXX methods. + * * @generated */ protected Model2Switch modelSwitch = new Model2Switch() @@ -106,10 +100,10 @@ public class Model2AdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the target. - * - * - * @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 */ @@ -121,10 +115,9 @@ public class Model2AdapterFactory extends AdapterFactoryImpl /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder Special Purchase Order}'. - * - * 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. - * + * 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.tests.model2.SpecialPurchaseOrder * @generated @@ -136,10 +129,9 @@ public class Model2AdapterFactory extends AdapterFactoryImpl /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Order Order}'. - * - * 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. - * + * 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.tests.model1.Order * @generated @@ -151,10 +143,9 @@ public class Model2AdapterFactory extends AdapterFactoryImpl /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder Purchase Order}'. - * - * 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. - * + * 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.tests.model1.PurchaseOrder * @generated @@ -165,10 +156,9 @@ public class Model2AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * + * Creates a new adapter for the default case. This default implementation returns null. + * * @return the new adapter. * @generated */ @@ -177,4 +167,4 @@ public class Model2AdapterFactory extends AdapterFactoryImpl return null; } -} //Model2AdapterFactory +} // Model2AdapterFactory diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java index 6dac3c79dd..2ca8024df8 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java @@ -2,47 +2,41 @@ * * * - * $Id: Model2Switch.java,v 1.1 2008-04-07 07:36:37 estepper Exp $ + * $Id: Model2Switch.java,v 1.2 2008-04-07 08:28:21 estepper Exp $ */ package org.eclipse.emf.cdo.tests.model2.util; -import java.util.List; - import org.eclipse.emf.cdo.tests.model1.Order; import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; - -import org.eclipse.emf.cdo.tests.model2.*; +import org.eclipse.emf.cdo.tests.model2.Model2Package; +import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; +import java.util.List; + /** - * - * 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. - * + * 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.tests.model2.Model2Package * @generated */ public class Model2Switch { /** - * The cached model package - * - * + * The cached model package + * * @generated */ protected static Model2Package modelPackage; /** - * Creates an instance of the switch. - * - * + * Creates an instance of the switch. + * * @generated */ public Model2Switch() @@ -54,9 +48,9 @@ public class Model2Switch } /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * + * Calls caseXXX 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,9 +60,9 @@ public class Model2Switch } /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * + * Calls caseXXX 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,9 +80,9 @@ public class Model2Switch } /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * + * Calls caseXXX 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 */ @@ -111,12 +105,12 @@ public class Model2Switch } /** - * Returns the result of interpreting the object as an instance of 'Special Purchase Order'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of 'Special Purchase Order'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Special Purchase Order'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -127,12 +121,11 @@ public class Model2Switch } /** - * Returns the result of interpreting the object as an instance of 'Order'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of 'Order'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Order'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -143,12 +136,11 @@ public class Model2Switch } /** - * Returns the result of interpreting the object as an instance of 'Purchase Order'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of 'Purchase Order'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Purchase Order'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -159,12 +151,12 @@ public class Model2Switch } /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of 'EObject'. + * This implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated @@ -174,4 +166,4 @@ public class Model2Switch return null; } -} //Model2Switch +} // Model2Switch diff --git a/plugins/org.eclipse.emf.cdo/model/resource.genmodel b/plugins/org.eclipse.emf.cdo/model/resource.genmodel index 40e3d1b3f6..f3cfd877ae 100644 --- a/plugins/org.eclipse.emf.cdo/model/resource.genmodel +++ b/plugins/org.eclipse.emf.cdo/model/resource.genmodel @@ -10,7 +10,7 @@ featureDelegation="Reflective" complianceLevel="5.0" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"> eresource.ecore + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="eresource.ecore#/"> @@ -23,6 +23,7 @@ + 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 64625f4bb6..1d2a89a679 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 @@ -104,10 +104,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka */ public static EresourcePackage init() { - if (isInited) - { - return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI); - } + 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 @@ -296,10 +293,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka */ public void createPackageContents() { - if (isCreated) - { - return; - } + if (isCreated) return; isCreated = true; // Create classes and their features @@ -336,10 +330,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka */ public void initializePackageContents() { - if (isInitialized) - { - return; - } + if (isInitialized) return; isInitialized = true; // Initialize package @@ -359,10 +350,10 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka // Initialize classes and features; add operations and parameters 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); @@ -373,9 +364,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/EresourceSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java index a99ecbd2d6..2a0ac94b56 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 @@ -96,10 +96,7 @@ public class EresourceSwitch { CDOResource cdoResource = (CDOResource)theEObject; T result = caseCDOResource(cdoResource); - if (result == null) - { - result = defaultCase(theEObject); - } + if (result == null) result = defaultCase(theEObject); return result; } default: -- cgit v1.2.3