diff options
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. <!-- begin-user-doc --> <!-- @@ -58,6 +64,14 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** + * This helps manage the child creation extenders. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager( + EresourceEditPlugin.INSTANCE, EresourcePackage.eNS_URI); + + /** * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -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; } @@ -168,6 +182,36 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory } /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public List<IChildCreationExtender> getChildCreationExtenders() + { + return childCreationExtenderManager.getChildCreationExtenders(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) + { + return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ResourceLocator getResourceLocator() + { + return childCreationExtenderManager; + } + + /** * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -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 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> </classpath> 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 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> </classpath> 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 @@ <foreignModel>model1.ecore</foreignModel> <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables> <genPackages prefix="Model1" basePackage="org.eclipse.emf.cdo.tests" disposableProviderFactory="true" - ecorePackage="model1.ecore#/"> + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="model1.ecore#/"> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="model1.ecore#//VAT"> + <genEnumLiterals ecoreEnumLiteral="model1.ecore#//VAT/vat0"/> + <genEnumLiterals ecoreEnumLiteral="model1.ecore#//VAT/vat7"/> + <genEnumLiterals ecoreEnumLiteral="model1.ecore#//VAT/vat15"/> + </genEnums> <genClasses ecoreClass="model1.ecore#//Address"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model1.ecore#//Address/name"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model1.ecore#//Address/street"/> @@ -52,6 +57,7 @@ <genClasses ecoreClass="model1.ecore#//Product"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model1.ecore#//Product/name"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model1.ecore#//Product/orderDetails"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model1.ecore#//Product/vat"/> </genClasses> </genPackages> </genmodel:GenModel> 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 @@ <foreignModel>model2.ecore</foreignModel> <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables> <genPackages prefix="Model2" basePackage="org.eclipse.emf.cdo.tests" disposableProviderFactory="true" - ecorePackage="model2.ecore#/"> + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="model2.ecore#/"> <genClasses ecoreClass="model2.ecore#//SpecialPurchaseOrder"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model2.ecore#//SpecialPurchaseOrder/discountCode"/> </genClasses> 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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * The <b>Factory</b> for the model. - * It provides a create method for each non-abstract class of the model. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of + * the model. <!-- end-user-doc --> + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package * @generated */ public interface Model2Factory extends EFactory { /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ Model2Factory eINSTANCE = org.eclipse.emf.cdo.tests.model2.impl.Model2FactoryImpl.init(); /** - * Returns a new object of class '<em>Special Purchase Order</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Returns a new object of class '<em>Special Purchase Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return a new object of class '<em>Special Purchase Order</em>'. * @generated */ SpecialPurchaseOrder createSpecialPurchaseOrder(); /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * The <b>Package</b> for the model. - * It contains accessors for the meta objects to represent + * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains accessors for the meta objects to represent * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> * </ul> * <!-- end-user-doc --> + * * @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. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ String eNAME = "model2"; /** - * The package namespace URI. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model2/1.0.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ String eNS_PREFIX = "model2"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 <em>Special Purchase Order</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl <em>Special Purchase Order</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 '<em><b>Order Details</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__ORDER_DETAILS = Model1Package.PURCHASE_ORDER__ORDER_DETAILS; /** - * The feature id for the '<em><b>Date</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The feature id for the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__DATE = Model1Package.PURCHASE_ORDER__DATE; /** - * The feature id for the '<em><b>Supplier</b></em>' reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The feature id for the '<em><b>Supplier</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__SUPPLIER = Model1Package.PURCHASE_ORDER__SUPPLIER; /** - * The feature id for the '<em><b>Discount Code</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The feature id for the '<em><b>Discount Code</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * * @generated * @ordered */ int SPECIAL_PURCHASE_ORDER__DISCOUNT_CODE = Model1Package.PURCHASE_ORDER_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Special Purchase Order</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The number of structural features of the '<em>Special Purchase Order</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * * @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 <em>Special Purchase Order</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the meta object for class '<em>Special Purchase Order</em>'. * @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 <em>Discount Code</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the meta object for the attribute '<em>Discount Code</em>'. * @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. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the factory that creates the instances of the model. * @generated */ Model2Factory getModel2Factory(); /** - * <!-- begin-user-doc --> - * Defines literals for the meta objects that represent + * <!-- begin-user-doc --> Defines literals for the meta objects that represent * <ul> - * <li>each class,</li> - * <li>each feature of each class,</li> - * <li>each enum,</li> - * <li>and each data type</li> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> * </ul> * <!-- end-user-doc --> + * * @generated */ interface Literals { /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl <em>Special Purchase Order</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl <em>Special Purchase Order</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 '<em><b>Discount Code</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Discount Code</b></em>' attribute feature. <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * A representation of the model object '<em><b>Special Purchase Order</b></em>'. - * <!-- end-user-doc --> - * + * <!-- begin-user-doc --> A representation of the model object '<em><b>Special Purchase Order</b></em>'. <!-- + * end-user-doc --> * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode <em>Discount Code</em>}</li> + * <li>{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode <em>Discount Code</em>}</li> * </ul> * </p> - * + * * @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 '<em><b>Discount Code</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Discount Code</b></em>' attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Discount Code</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Discount Code</em>' attribute isn't clear, there really should be more of a + * description here... * </p> * <!-- end-user-doc --> + * * @return the value of the '<em>Discount Code</em>' 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 <em>Discount Code</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Discount Code</em>' attribute. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder#getDiscountCode <em>Discount Code</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Discount Code</em>' 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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * An implementation of the model <b>Factory</b>. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> + * * @generated */ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public static Model2Factory init() @@ -49,9 +47,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public Model2FactoryImpl() @@ -60,8 +57,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -77,8 +74,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public SpecialPurchaseOrder createSpecialPurchaseOrder() @@ -88,8 +85,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public Model2Package getModel2Package() @@ -98,8 +95,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * An implementation of the model <b>Package</b>. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> + * * @generated */ public class Model2PackageImpl extends EPackageImpl implements Model2Package { /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ private EClass specialPurchaseOrderEClass = null; /** * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - * <p>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. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI value. + * <p> + * 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. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * * @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 } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ private static boolean isInited = false; /** - * 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 --> + * 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 --> + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -109,8 +100,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public EClass getSpecialPurchaseOrder() @@ -119,8 +110,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public EAttribute getSpecialPurchaseOrder_DiscountCode() @@ -129,8 +120,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public Model2Factory getModel2Factory() @@ -139,17 +130,16 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its + * first. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public void createPackageContents() @@ -163,17 +153,16 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any + * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Special Purchase Order</b></em>'. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Special Purchase Order</b></em>'. <!-- + * end-user-doc --> * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl#getDiscountCode <em>Discount Code</em>}</li> + * <li>{@link org.eclipse.emf.cdo.tests.model2.impl.SpecialPurchaseOrderImpl#getDiscountCode <em>Discount Code</em>}</li> * </ul> * </p> - * + * * @generated */ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements SpecialPurchaseOrder { /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ protected SpecialPurchaseOrderImpl() @@ -39,8 +37,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -50,8 +48,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public String getDiscountCode() @@ -60,8 +58,8 @@ public class SpecialPurchaseOrderImpl extends PurchaseOrderImpl implements Speci } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; /** - * <!-- begin-user-doc --> - * The <b>Adapter Factory</b> for the model. - * It provides an adapter <code>createXXX</code> method for each class of the model. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> + * method for each class of the model. <!-- end-user-doc --> + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package * @generated */ public class Model2AdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ protected static Model2Package modelPackage; /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public Model2AdapterFactory() @@ -51,10 +46,10 @@ public class Model2AdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. - * <!-- begin-user-doc --> - * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. - * <!-- end-user-doc --> + * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation + * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!-- + * end-user-doc --> + * * @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 <code>createXXX</code> methods. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ protected Model2Switch<Adapter> modelSwitch = new Model2Switch<Adapter>() @@ -106,10 +100,10 @@ public class Model2AdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the <code>target</code>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param target the object to adapt. + * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param target + * the object to adapt. * @return the adapter for the <code>target</code>. * @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 <em>Special Purchase Order</em>}'. - * <!-- begin-user-doc --> - * 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. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * * @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 <em>Order</em>}'. - * <!-- begin-user-doc --> - * 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. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * * @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 <em>Purchase Order</em>}'. - * <!-- begin-user-doc --> - * 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. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * * @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. - * <!-- begin-user-doc --> - * This default implementation returns null. - * <!-- end-user-doc --> + * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!-- + * end-user-doc --> + * * @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 @@ * <copyright> * </copyright> * - * $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; + /** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> 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. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call + * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> 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. <!-- end-user-doc --> + * * @see org.eclipse.emf.cdo.tests.model2.Model2Package * @generated */ public class Model2Switch<T> { /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ protected static Model2Package modelPackage; /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ public Model2Switch() @@ -54,9 +48,9 @@ public class Model2Switch<T> } /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that + * result. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @@ -66,9 +60,9 @@ public class Model2Switch<T> } /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that + * result. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @@ -86,9 +80,9 @@ public class Model2Switch<T> } /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that + * result. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @@ -111,12 +105,12 @@ public class Model2Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>Special Purchase Order</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of '<em>Special Purchase Order</em>'. <!-- + * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Special Purchase Order</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -127,12 +121,11 @@ public class Model2Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>Order</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of '<em>Order</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Order</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -143,12 +136,11 @@ public class Model2Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Purchase Order</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -159,12 +151,12 @@ public class Model2Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. <!-- end-user-doc --> + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated @@ -174,4 +166,4 @@ public class Model2Switch<T> 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"> <foreignModel>eresource.ecore</foreignModel> <genPackages prefix="Eresource" basePackage="org.eclipse.emf.cdo" disposableProviderFactory="true" - ecorePackage="eresource.ecore#/"> + extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="eresource.ecore#/"> <genDataTypes ecoreDataType="eresource.ecore#//ResourceSet"/> <genDataTypes ecoreDataType="eresource.ecore#//URI"/> <genDataTypes ecoreDataType="eresource.ecore#//Diagnostic"/> @@ -23,6 +23,7 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute eresource.ecore#//CDOResource/trackingModification"/> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute eresource.ecore#//CDOResource/errors"/> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute eresource.ecore#//CDOResource/warnings"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute eresource.ecore#//CDOResource/timeStamp"/> <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute eresource.ecore#//CDOResource/path"/> </genClasses> </genPackages> 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<T> { CDOResource cdoResource = (CDOResource)theEObject; T result = caseCDOResource(cdoResource); - if (result == null) - { - result = defaultCase(theEObject); - } + if (result == null) result = defaultCase(theEObject); return result; } default: |