From a0520cf513fcc389b4334a30fc8474cab5cf3188 Mon Sep 17 00:00:00 2001 From: Arthur Daussy Date: Mon, 16 Jun 2014 14:38:02 +0200 Subject: [PATCH] Regenerates EMF Compare static test profile. Regenerates the test profil to add 2 stereotypes. Updates to UML 2.5. Updates to EMF 2.10. Change-Id: I89996f74abe751ba8db06e7565cfa4a33345fef9 Signed-off-by: Arthur Daussy --- .../META-INF/MANIFEST.MF | 4 +- .../model/UML2CompareTestProfile.genmodel | 31 ++- .../model/uml2.compare.testprofile.profile.uml | 137 ++++++++--- .../model/uml2comparetestprofile.ecore | 30 ++- .../test/uml2comparetestprofile/ACliche.java | 6 +- .../{ACliche.java => ACliche2.java} | 42 ++-- .../test/uml2comparetestprofile/ACliche3.java | 59 +++++ .../UML2CompareTestProfileFactory.java | 18 +- .../UML2CompareTestProfilePackage.java | 261 ++++++++++++++++++++- .../impl/{AClicheImpl.java => ACliche2Impl.java} | 83 +++---- .../uml2comparetestprofile/impl/ACliche3Impl.java | 168 +++++++++++++ .../uml2comparetestprofile/impl/AClicheImpl.java | 32 +-- .../impl/UML2CompareTestProfileFactoryImpl.java | 33 ++- .../impl/UML2CompareTestProfilePackageImpl.java | 207 +++++++++++++--- .../util/UML2CompareTestProfileAdapterFactory.java | 41 +++- .../util/UML2CompareTestProfileSwitch.java | 120 ++++++---- 16 files changed, 1054 insertions(+), 218 deletions(-) copy plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/{ACliche.java => ACliche2.java} (85%) create mode 100644 plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche3.java copy plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/{AClicheImpl.java => ACliche2Impl.java} (80%) create mode 100644 plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche3Impl.java diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF index 568c14b66..017ca9f3d 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.compare.uml2.tests/META-INF/MANIFEST.MF @@ -12,7 +12,9 @@ Export-Package: org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util, org.eclipse.emf.compare.uml2.tests Require-Bundle: org.eclipse.core.runtime, - org.eclipse.uml2.uml;bundle-version="5.0.0", + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.uml2.uml;bundle-version="5.0.0";visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, org.eclipse.uml2.uml.resources;bundle-version="5.0.0", org.junit, org.eclipse.emf.compare, diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/model/UML2CompareTestProfile.genmodel b/plugins/org.eclipse.emf.compare.uml2.tests/model/UML2CompareTestProfile.genmodel index 52492c05e..bbaa1cb54 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/model/UML2CompareTestProfile.genmodel +++ b/plugins/org.eclipse.emf.compare.uml2.tests/model/UML2CompareTestProfile.genmodel @@ -1,10 +1,9 @@ - +
@@ -22,6 +21,12 @@
+
+
+
+
+
+
uml2.compare.testprofile.profile.uml + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml index 69f851483..e3594d930 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml +++ b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2.compare.testprofile.profile.uml @@ -1,95 +1,148 @@ - + - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -97,39 +150,47 @@ - + - + - + - + - + - + - - + + + + + + + + + + - + diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2comparetestprofile.ecore b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2comparetestprofile.ecore index dcde71008..43f64bb53 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2comparetestprofile.ecore +++ b/plugins/org.eclipse.emf.compare.uml2.tests/model/uml2comparetestprofile.ecore @@ -1,13 +1,15 @@ - + + +
+ + ordered="false" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/> + eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/> + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java index edcb2e427..eb176feea 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,7 +51,7 @@ public interface ACliche extends EObject { * @return the value of the 'Single Valued Attribute' attribute. * @see #setSingleValuedAttribute(String) * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_SingleValuedAttribute() - * @model ordered="false" + * @model dataType="org.eclipse.uml2.types.String" ordered="false" * @generated */ String getSingleValuedAttribute(); @@ -79,7 +79,7 @@ public interface ACliche extends EObject { * * @return the value of the 'Many Valued Attribute' attribute list. * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_ManyValuedAttribute() - * @model + * @model dataType="org.eclipse.uml2.types.String" * @generated */ EList getManyValuedAttribute(); diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche2.java similarity index 85% copy from plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java copy to plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche2.java index edcb2e427..310cd8c20 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche2.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,31 +15,33 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; /** - * A representation of the model object 'ACliche'. A representation of the model object 'ACliche2'. *

* The following features are supported: *

    *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getSingleValuedAttribute + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedAttribute * Single Valued Attribute}
  • - *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getManyValuedAttribute + *
  • + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedAttribute * Many Valued Attribute}
  • *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getSingleValuedReference + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedReference * Single Valued Reference}
  • - *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getManyValuedReference + *
  • + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedReference * Many Valued Reference}
  • - *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getBase_Class Base + *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getBase_Class Base * Class}
  • *
*

* - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche() + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2() * @model * @generated */ -public interface ACliche extends EObject { +public interface ACliche2 extends EObject { /** * Returns the value of the 'Single Valued Attribute' attribute. *

@@ -50,15 +52,15 @@ public interface ACliche extends EObject { * * @return the value of the 'Single Valued Attribute' attribute. * @see #setSingleValuedAttribute(String) - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_SingleValuedAttribute() - * @model ordered="false" + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2_SingleValuedAttribute() + * @model dataType="org.eclipse.uml2.types.String" ordered="false" * @generated */ String getSingleValuedAttribute(); /** * Sets the value of the ' - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getSingleValuedAttribute + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedAttribute * Single Valued Attribute}' attribute. * * @param value @@ -78,8 +80,8 @@ public interface ACliche extends EObject { * * * @return the value of the 'Many Valued Attribute' attribute list. - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_ManyValuedAttribute() - * @model + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2_ManyValuedAttribute() + * @model dataType="org.eclipse.uml2.types.String" * @generated */ EList getManyValuedAttribute(); @@ -94,7 +96,7 @@ public interface ACliche extends EObject { * * @return the value of the 'Single Valued Reference' reference. * @see #setSingleValuedReference(org.eclipse.uml2.uml.Class) - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_SingleValuedReference() + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2_SingleValuedReference() * @model ordered="false" * @generated */ @@ -102,7 +104,7 @@ public interface ACliche extends EObject { /** * Sets the value of the ' - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getSingleValuedReference + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedReference * Single Valued Reference}' reference. * * @param value @@ -122,7 +124,7 @@ public interface ACliche extends EObject { * * * @return the value of the 'Many Valued Reference' reference list. - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_ManyValuedReference() + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2_ManyValuedReference() * @model * @generated */ @@ -172,7 +174,7 @@ public interface ACliche extends EObject { * * @return the value of the 'Base Class' reference. * @see #setBase_Class(org.eclipse.uml2.uml.Class) - * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche_Base_Class() + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche2_Base_Class() * @model required="true" ordered="false" * @generated */ @@ -180,7 +182,7 @@ public interface ACliche extends EObject { /** * Sets the value of the ' - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche#getBase_Class + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getBase_Class * Base Class}' reference. * * @param value @@ -190,4 +192,4 @@ public interface ACliche extends EObject { */ void setBase_Class(org.eclipse.uml2.uml.Class value); -} // ACliche +} // ACliche2 diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche3.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche3.java new file mode 100644 index 000000000..8e9b7f0ec --- /dev/null +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/ACliche3.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2011, 2014 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'ACliche3'. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3#getBase_Class Base + * Class}
  • + *
+ *

+ * + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche3() + * @model + * @generated + */ +public interface ACliche3 extends EObject { + /** + * Returns the value of the 'Base Class' reference. + *

+ * If the meaning of the 'Base Class' reference isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Base Class' reference. + * @see #setBase_Class(org.eclipse.uml2.uml.Class) + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage#getACliche3_Base_Class() + * @model required="true" ordered="false" + * @generated + */ + org.eclipse.uml2.uml.Class getBase_Class(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3#getBase_Class + * Base Class}' reference. + * + * @param value + * the new value of the 'Base Class' reference. + * @see #getBase_Class() + * @generated + */ + void setBase_Class(org.eclipse.uml2.uml.Class value); + +} // ACliche3 diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfileFactory.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfileFactory.java index 0e1ba0e46..2bc5c05b4 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfileFactory.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfileFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,6 +37,22 @@ public interface UML2CompareTestProfileFactory extends EFactory { ACliche createACliche(); /** + * Returns a new object of class 'ACliche2'. + * + * @return a new object of class 'ACliche2'. + * @generated + */ + ACliche2 createACliche2(); + + /** + * Returns a new object of class 'ACliche3'. + * + * @return a new object of class 'ACliche3'. + * @generated + */ + ACliche3 createACliche3(); + + /** * Returns the package supported by this factory. * * @return the package supported by this factory. diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfilePackage.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfilePackage.java index 85d9e5862..bf5b271df 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfilePackage.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/UML2CompareTestProfilePackage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,6 +28,7 @@ import org.eclipse.emf.ecore.EReference; * * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfileFactory * @model kind="package" + * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='UML2CompareTestProfile'" * @generated */ public interface UML2CompareTestProfilePackage extends EPackage { @@ -126,6 +127,100 @@ public interface UML2CompareTestProfilePackage extends EPackage { int ACLICHE_FEATURE_COUNT = 5; /** + * The meta object id for the ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl + * ACliche2}' class. + * + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.UML2CompareTestProfilePackageImpl#getACliche2() + * @generated + */ + int ACLICHE2 = 1; + + /** + * The feature id for the 'Single Valued Attribute' attribute. + * + * + * @generated + * @ordered + */ + int ACLICHE2__SINGLE_VALUED_ATTRIBUTE = 0; + + /** + * The feature id for the 'Many Valued Attribute' attribute list. + * + * + * @generated + * @ordered + */ + int ACLICHE2__MANY_VALUED_ATTRIBUTE = 1; + + /** + * The feature id for the 'Single Valued Reference' reference. + * + * + * @generated + * @ordered + */ + int ACLICHE2__SINGLE_VALUED_REFERENCE = 2; + + /** + * The feature id for the 'Many Valued Reference' reference list. + * + * + * @generated + * @ordered + */ + int ACLICHE2__MANY_VALUED_REFERENCE = 3; + + /** + * The feature id for the 'Base Class' reference. + * + * @generated + * @ordered + */ + int ACLICHE2__BASE_CLASS = 4; + + /** + * The number of structural features of the 'ACliche2' class. + * + * @generated + * @ordered + */ + int ACLICHE2_FEATURE_COUNT = 5; + + /** + * The meta object id for the ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl + * ACliche3}' class. + * + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.UML2CompareTestProfilePackageImpl#getACliche3() + * @generated + */ + int ACLICHE3 = 2; + + /** + * The feature id for the 'Base Class' reference. + * + * @generated + * @ordered + */ + int ACLICHE3__BASE_CLASS = 0; + + /** + * The number of structural features of the 'ACliche3' class. + * + * @generated + * @ordered + */ + int ACLICHE3_FEATURE_COUNT = 1; + + /** * Returns the meta object for class ' * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche ACliche}'. * @@ -197,6 +292,100 @@ public interface UML2CompareTestProfilePackage extends EPackage { EReference getACliche_Base_Class(); /** + * Returns the meta object for class ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2 ACliche2}'. + * + * + * @return the meta object for class 'ACliche2'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2 + * @generated + */ + EClass getACliche2(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedAttribute + * Single Valued Attribute}'. + * + * @return the meta object for the attribute 'Single Valued Attribute'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedAttribute() + * @see #getACliche2() + * @generated + */ + EAttribute getACliche2_SingleValuedAttribute(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedAttribute + * Many Valued Attribute}'. + * + * @return the meta object for the attribute list 'Many Valued Attribute'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedAttribute() + * @see #getACliche2() + * @generated + */ + EAttribute getACliche2_ManyValuedAttribute(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedReference + * Single Valued Reference}'. + * + * @return the meta object for the reference 'Single Valued Reference'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getSingleValuedReference() + * @see #getACliche2() + * @generated + */ + EReference getACliche2_SingleValuedReference(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedReference + * Many Valued Reference}'. + * + * @return the meta object for the reference list 'Many Valued Reference'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getManyValuedReference() + * @see #getACliche2() + * @generated + */ + EReference getACliche2_ManyValuedReference(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getBase_Class + * Base Class}'. + * + * @return the meta object for the reference 'Base Class'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2#getBase_Class() + * @see #getACliche2() + * @generated + */ + EReference getACliche2_Base_Class(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3 ACliche3}'. + * + * + * @return the meta object for class 'ACliche3'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3 + * @generated + */ + EClass getACliche3(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3#getBase_Class + * Base Class}'. + * + * @return the meta object for the reference 'Base Class'. + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3#getBase_Class() + * @see #getACliche3() + * @generated + */ + EReference getACliche3_Base_Class(); + + /** * Returns the factory that creates the instances of the model. * @@ -269,6 +458,76 @@ public interface UML2CompareTestProfilePackage extends EPackage { */ EReference ACLICHE__BASE_CLASS = eINSTANCE.getACliche_Base_Class(); + /** + * The meta object literal for the ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl + * ACliche2}' class. + * + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.UML2CompareTestProfilePackageImpl#getACliche2() + * @generated + */ + EClass ACLICHE2 = eINSTANCE.getACliche2(); + + /** + * The meta object literal for the 'Single Valued Attribute' attribute feature. + * + * @generated + */ + EAttribute ACLICHE2__SINGLE_VALUED_ATTRIBUTE = eINSTANCE.getACliche2_SingleValuedAttribute(); + + /** + * The meta object literal for the 'Many Valued Attribute' attribute list feature. + * + * + * @generated + */ + EAttribute ACLICHE2__MANY_VALUED_ATTRIBUTE = eINSTANCE.getACliche2_ManyValuedAttribute(); + + /** + * The meta object literal for the 'Single Valued Reference' reference feature. + * + * @generated + */ + EReference ACLICHE2__SINGLE_VALUED_REFERENCE = eINSTANCE.getACliche2_SingleValuedReference(); + + /** + * The meta object literal for the 'Many Valued Reference' reference list feature. + * + * + * @generated + */ + EReference ACLICHE2__MANY_VALUED_REFERENCE = eINSTANCE.getACliche2_ManyValuedReference(); + + /** + * The meta object literal for the 'Base Class' reference feature. + * + * @generated + */ + EReference ACLICHE2__BASE_CLASS = eINSTANCE.getACliche2_Base_Class(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl + * ACliche3}' class. + * + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl + * @see org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.UML2CompareTestProfilePackageImpl#getACliche3() + * @generated + */ + EClass ACLICHE3 = eINSTANCE.getACliche3(); + + /** + * The meta object literal for the 'Base Class' reference feature. + * + * @generated + */ + EReference ACLICHE3__BASE_CLASS = eINSTANCE.getACliche3_Base_Class(); + } } // UML2CompareTestProfilePackage diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche2Impl.java similarity index 80% copy from plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java copy to plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche2Impl.java index d772bcfdb..159baa11e 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche2Impl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; @@ -24,31 +24,32 @@ import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; import org.eclipse.emf.ecore.util.EObjectResolvingEList; /** - * An implementation of the model object 'ACliche'. An implementation of the model object 'ACliche2'. *

* The following features are implemented: *

    *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.AClicheImpl#getSingleValuedAttribute + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl#getSingleValuedAttribute * Single Valued Attribute}
  • *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.AClicheImpl#getManyValuedAttribute + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl#getManyValuedAttribute * Many Valued Attribute}
  • *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.AClicheImpl#getSingleValuedReference + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl#getSingleValuedReference * Single Valued Reference}
  • *
  • - * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.AClicheImpl#getManyValuedReference + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl#getManyValuedReference * Many Valued Reference}
  • - *
  • {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.AClicheImpl#getBase_Class + *
  • + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche2Impl#getBase_Class * Base Class}
  • *
*

* * @generated */ -public class AClicheImpl extends EObjectImpl implements ACliche { +public class ACliche2Impl extends EObjectImpl implements ACliche2 { /** * The default value of the '{@link #getSingleValuedAttribute() Single Valued Attribute}' * attribute. @@ -114,7 +115,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { * * @generated */ - protected AClicheImpl() { + protected ACliche2Impl() { super(); } @@ -125,7 +126,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { */ @Override protected EClass eStaticClass() { - return UML2CompareTestProfilePackage.Literals.ACLICHE; + return UML2CompareTestProfilePackage.Literals.ACLICHE2; } /** @@ -147,8 +148,8 @@ public class AClicheImpl extends EObjectImpl implements ACliche { singleValuedAttribute = newSingleValuedAttribute; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, - UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE, oldSingleValuedAttribute, - singleValuedAttribute)); + UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_ATTRIBUTE, + oldSingleValuedAttribute, singleValuedAttribute)); } } @@ -160,7 +161,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { public EList getManyValuedAttribute() { if (manyValuedAttribute == null) { manyValuedAttribute = new EDataTypeUniqueEList(String.class, this, - UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE); + UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_ATTRIBUTE); } return manyValuedAttribute; } @@ -177,7 +178,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { if (singleValuedReference != oldSingleValuedReference) { if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, - UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE, + UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, singleValuedReference)); } } @@ -204,8 +205,8 @@ public class AClicheImpl extends EObjectImpl implements ACliche { singleValuedReference = newSingleValuedReference; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, - UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, - singleValuedReference)); + UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE, + oldSingleValuedReference, singleValuedReference)); } } @@ -218,7 +219,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { if (manyValuedReference == null) { manyValuedReference = new EObjectResolvingEList( org.eclipse.uml2.uml.Class.class, this, - UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE); + UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_REFERENCE); } return manyValuedReference; } @@ -264,7 +265,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { if (base_Class != oldBase_Class) { if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, - UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS, oldBase_Class, base_Class)); + UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS, oldBase_Class, base_Class)); } } } @@ -290,7 +291,7 @@ public class AClicheImpl extends EObjectImpl implements ACliche { base_Class = newBase_Class; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, - UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS, oldBase_Class, base_Class)); + UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS, oldBase_Class, base_Class)); } } @@ -302,18 +303,18 @@ public class AClicheImpl extends EObjectImpl implements ACliche { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_ATTRIBUTE: return getSingleValuedAttribute(); - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_ATTRIBUTE: return getManyValuedAttribute(); - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE: if (resolve) { return getSingleValuedReference(); } return basicGetSingleValuedReference(); - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_REFERENCE: return getManyValuedReference(); - case UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS: + case UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS: if (resolve) { return getBase_Class(); } @@ -331,21 +332,21 @@ public class AClicheImpl extends EObjectImpl implements ACliche { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_ATTRIBUTE: setSingleValuedAttribute((String)newValue); return; - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_ATTRIBUTE: getManyValuedAttribute().clear(); getManyValuedAttribute().addAll((Collection)newValue); return; - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE: setSingleValuedReference((org.eclipse.uml2.uml.Class)newValue); return; - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_REFERENCE: getManyValuedReference().clear(); getManyValuedReference().addAll((Collection)newValue); return; - case UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS: + case UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS: setBase_Class((org.eclipse.uml2.uml.Class)newValue); return; } @@ -360,19 +361,19 @@ public class AClicheImpl extends EObjectImpl implements ACliche { @Override public void eUnset(int featureID) { switch (featureID) { - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_ATTRIBUTE: setSingleValuedAttribute(SINGLE_VALUED_ATTRIBUTE_EDEFAULT); return; - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_ATTRIBUTE: getManyValuedAttribute().clear(); return; - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE: setSingleValuedReference((org.eclipse.uml2.uml.Class)null); return; - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_REFERENCE: getManyValuedReference().clear(); return; - case UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS: + case UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS: setBase_Class((org.eclipse.uml2.uml.Class)null); return; } @@ -387,16 +388,16 @@ public class AClicheImpl extends EObjectImpl implements ACliche { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_ATTRIBUTE: return SINGLE_VALUED_ATTRIBUTE_EDEFAULT == null ? singleValuedAttribute != null : !SINGLE_VALUED_ATTRIBUTE_EDEFAULT.equals(singleValuedAttribute); - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_ATTRIBUTE: return manyValuedAttribute != null && !manyValuedAttribute.isEmpty(); - case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__SINGLE_VALUED_REFERENCE: return singleValuedReference != null; - case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE: + case UML2CompareTestProfilePackage.ACLICHE2__MANY_VALUED_REFERENCE: return manyValuedReference != null && !manyValuedReference.isEmpty(); - case UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS: + case UML2CompareTestProfilePackage.ACLICHE2__BASE_CLASS: return base_Class != null; } return super.eIsSet(featureID); @@ -422,4 +423,4 @@ public class AClicheImpl extends EObjectImpl implements ACliche { return result.toString(); } -} // AClicheImpl +} // ACliche2Impl diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche3Impl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche3Impl.java new file mode 100644 index 000000000..07c13cc48 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/ACliche3Impl.java @@ -0,0 +1,168 @@ +/******************************************************************************* + * Copyright (c) 2011, 2014 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * An implementation of the model object 'ACliche3'. + *

+ * The following features are implemented: + *

    + *
  • + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl#getBase_Class + * Base Class}
  • + *
+ *

+ * + * @generated + */ +public class ACliche3Impl extends EObjectImpl implements ACliche3 { + /** + * The cached value of the '{@link #getBase_Class() Base Class}' reference. + * + * @see #getBase_Class() + * @generated + * @ordered + */ + protected org.eclipse.uml2.uml.Class base_Class; + + /** + * + * + * @generated + */ + protected ACliche3Impl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return UML2CompareTestProfilePackage.Literals.ACLICHE3; + } + + /** + * + * + * @generated + */ + public org.eclipse.uml2.uml.Class getBase_Class() { + if (base_Class != null && base_Class.eIsProxy()) { + InternalEObject oldBase_Class = (InternalEObject)base_Class; + base_Class = (org.eclipse.uml2.uml.Class)eResolveProxy(oldBase_Class); + if (base_Class != oldBase_Class) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS, oldBase_Class, base_Class)); + } + } + } + return base_Class; + } + + /** + * + * + * @generated + */ + public org.eclipse.uml2.uml.Class basicGetBase_Class() { + return base_Class; + } + + /** + * + * + * @generated + */ + public void setBase_Class(org.eclipse.uml2.uml.Class newBase_Class) { + org.eclipse.uml2.uml.Class oldBase_Class = base_Class; + base_Class = newBase_Class; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS, oldBase_Class, base_Class)); + } + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS: + if (resolve) { + return getBase_Class(); + } + return basicGetBase_Class(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS: + setBase_Class((org.eclipse.uml2.uml.Class)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS: + setBase_Class((org.eclipse.uml2.uml.Class)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case UML2CompareTestProfilePackage.ACLICHE3__BASE_CLASS: + return base_Class != null; + } + return super.eIsSet(featureID); + } + +} // ACliche3Impl diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java index d772bcfdb..203d8dee6 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/AClicheImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -145,11 +145,10 @@ public class AClicheImpl extends EObjectImpl implements ACliche { public void setSingleValuedAttribute(String newSingleValuedAttribute) { String oldSingleValuedAttribute = singleValuedAttribute; singleValuedAttribute = newSingleValuedAttribute; - if (eNotificationRequired()) { + if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_ATTRIBUTE, oldSingleValuedAttribute, singleValuedAttribute)); - } } /** @@ -175,11 +174,10 @@ public class AClicheImpl extends EObjectImpl implements ACliche { InternalEObject oldSingleValuedReference = (InternalEObject)singleValuedReference; singleValuedReference = (org.eclipse.uml2.uml.Class)eResolveProxy(oldSingleValuedReference); if (singleValuedReference != oldSingleValuedReference) { - if (eNotificationRequired()) { + if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, singleValuedReference)); - } } } return singleValuedReference; @@ -202,11 +200,10 @@ public class AClicheImpl extends EObjectImpl implements ACliche { public void setSingleValuedReference(org.eclipse.uml2.uml.Class newSingleValuedReference) { org.eclipse.uml2.uml.Class oldSingleValuedReference = singleValuedReference; singleValuedReference = newSingleValuedReference; - if (eNotificationRequired()) { + if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, singleValuedReference)); - } } /** @@ -239,14 +236,12 @@ public class AClicheImpl extends EObjectImpl implements ACliche { */ public org.eclipse.uml2.uml.Class getManyValuedReference(String name, boolean ignoreCase, EClass eClass) { manyValuedReferenceLoop: for (org.eclipse.uml2.uml.Class manyValuedReference : getManyValuedReference()) { - if (eClass != null && !eClass.isInstance(manyValuedReference)) { + if (eClass != null && !eClass.isInstance(manyValuedReference)) continue manyValuedReferenceLoop; - } if (name != null && !(ignoreCase ? name.equalsIgnoreCase(manyValuedReference.getName()) : name - .equals(manyValuedReference.getName()))) { + .equals(manyValuedReference.getName()))) continue manyValuedReferenceLoop; - } return manyValuedReference; } return null; @@ -262,10 +257,9 @@ public class AClicheImpl extends EObjectImpl implements ACliche { InternalEObject oldBase_Class = (InternalEObject)base_Class; base_Class = (org.eclipse.uml2.uml.Class)eResolveProxy(oldBase_Class); if (base_Class != oldBase_Class) { - if (eNotificationRequired()) { + if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS, oldBase_Class, base_Class)); - } } } return base_Class; @@ -288,10 +282,9 @@ public class AClicheImpl extends EObjectImpl implements ACliche { public void setBase_Class(org.eclipse.uml2.uml.Class newBase_Class) { org.eclipse.uml2.uml.Class oldBase_Class = base_Class; base_Class = newBase_Class; - if (eNotificationRequired()) { + if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS, oldBase_Class, base_Class)); - } } /** @@ -307,16 +300,14 @@ public class AClicheImpl extends EObjectImpl implements ACliche { case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_ATTRIBUTE: return getManyValuedAttribute(); case UML2CompareTestProfilePackage.ACLICHE__SINGLE_VALUED_REFERENCE: - if (resolve) { + if (resolve) return getSingleValuedReference(); - } return basicGetSingleValuedReference(); case UML2CompareTestProfilePackage.ACLICHE__MANY_VALUED_REFERENCE: return getManyValuedReference(); case UML2CompareTestProfilePackage.ACLICHE__BASE_CLASS: - if (resolve) { + if (resolve) return getBase_Class(); - } return basicGetBase_Class(); } return super.eGet(featureID, resolve, coreType); @@ -409,9 +400,8 @@ public class AClicheImpl extends EObjectImpl implements ACliche { */ @Override public String toString() { - if (eIsProxy()) { + if (eIsProxy()) return super.toString(); - } StringBuffer result = new StringBuffer(super.toString()); result.append(" (singleValuedAttribute: "); //$NON-NLS-1$ diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java index 93bc8682a..e8963f206 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfileFactoryImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.*; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfileFactory; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; @@ -33,7 +34,7 @@ public class UML2CompareTestProfileFactoryImpl extends EFactoryImpl implements U public static UML2CompareTestProfileFactory init() { try { UML2CompareTestProfileFactory theUML2CompareTestProfileFactory = (UML2CompareTestProfileFactory)EPackage.Registry.INSTANCE - .getEFactory("http://www.eclipse.org/emf/compare/uml2/1.0.0/testprofile"); //$NON-NLS-1$ + .getEFactory(UML2CompareTestProfilePackage.eNS_URI); if (theUML2CompareTestProfileFactory != null) { return theUML2CompareTestProfileFactory; } @@ -62,9 +63,13 @@ public class UML2CompareTestProfileFactoryImpl extends EFactoryImpl implements U switch (eClass.getClassifierID()) { case UML2CompareTestProfilePackage.ACLICHE: return createACliche(); + case UML2CompareTestProfilePackage.ACLICHE2: + return createACliche2(); + case UML2CompareTestProfilePackage.ACLICHE3: + return createACliche3(); default: - throw new IllegalArgumentException("The class '" + eClass.getName() //$NON-NLS-1$ - + "' is not a valid classifier"); //$NON-NLS-1$ + throw new IllegalArgumentException( + "The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -83,6 +88,26 @@ public class UML2CompareTestProfileFactoryImpl extends EFactoryImpl implements U * * @generated */ + public ACliche2 createACliche2() { + ACliche2Impl aCliche2 = new ACliche2Impl(); + return aCliche2; + } + + /** + * + * + * @generated + */ + public ACliche3 createACliche3() { + ACliche3Impl aCliche3 = new ACliche3Impl(); + return aCliche3; + } + + /** + * + * + * @generated + */ public UML2CompareTestProfilePackage getUML2CompareTestProfilePackage() { return (UML2CompareTestProfilePackage)getEPackage(); } diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfilePackageImpl.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfilePackageImpl.java index 966ebb9c7..5118a9832 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfilePackageImpl.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/impl/UML2CompareTestProfilePackageImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,8 @@ package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfileFactory; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; import org.eclipse.emf.ecore.EAttribute; @@ -18,6 +20,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.uml2.types.TypesPackage; import org.eclipse.uml2.uml.UMLPackage; /** @@ -34,6 +37,20 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U private EClass aClicheEClass = null; /** + * + * + * @generated + */ + private EClass aCliche2EClass = null; + + /** + * + * + * @generated + */ + private EClass aCliche3EClass = 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. *

@@ -71,10 +88,9 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U * @generated */ public static UML2CompareTestProfilePackage init() { - if (isInited) { + if (isInited) return (UML2CompareTestProfilePackage)EPackage.Registry.INSTANCE .getEPackage(UML2CompareTestProfilePackage.eNS_URI); - } // Obtain or create and register package UML2CompareTestProfilePackageImpl theUML2CompareTestProfilePackage = (UML2CompareTestProfilePackageImpl)(EPackage.Registry.INSTANCE @@ -160,6 +176,78 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U * * @generated */ + public EClass getACliche2() { + return aCliche2EClass; + } + + /** + * + * + * @generated + */ + public EAttribute getACliche2_SingleValuedAttribute() { + return (EAttribute)aCliche2EClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getACliche2_ManyValuedAttribute() { + return (EAttribute)aCliche2EClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getACliche2_SingleValuedReference() { + return (EReference)aCliche2EClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getACliche2_ManyValuedReference() { + return (EReference)aCliche2EClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getACliche2_Base_Class() { + return (EReference)aCliche2EClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getACliche3() { + return aCliche3EClass; + } + + /** + * + * + * @generated + */ + public EReference getACliche3_Base_Class() { + return (EReference)aCliche3EClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ public UML2CompareTestProfileFactory getUML2CompareTestProfileFactory() { return (UML2CompareTestProfileFactory)getEFactoryInstance(); } @@ -178,9 +266,8 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U * @generated */ public void createPackageContents() { - if (isCreated) { + if (isCreated) return; - } isCreated = true; // Create classes and their features @@ -190,6 +277,16 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U createEReference(aClicheEClass, ACLICHE__SINGLE_VALUED_REFERENCE); createEReference(aClicheEClass, ACLICHE__MANY_VALUED_REFERENCE); createEReference(aClicheEClass, ACLICHE__BASE_CLASS); + + aCliche2EClass = createEClass(ACLICHE2); + createEAttribute(aCliche2EClass, ACLICHE2__SINGLE_VALUED_ATTRIBUTE); + createEAttribute(aCliche2EClass, ACLICHE2__MANY_VALUED_ATTRIBUTE); + createEReference(aCliche2EClass, ACLICHE2__SINGLE_VALUED_REFERENCE); + createEReference(aCliche2EClass, ACLICHE2__MANY_VALUED_REFERENCE); + createEReference(aCliche2EClass, ACLICHE2__BASE_CLASS); + + aCliche3EClass = createEClass(ACLICHE3); + createEReference(aCliche3EClass, ACLICHE3__BASE_CLASS); } /** @@ -206,9 +303,8 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U * @generated */ public void initializePackageContents() { - if (isInitialized) { + if (isInitialized) return; - } isInitialized = true; // Initialize package @@ -217,6 +313,8 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U setNsURI(eNS_URI); // Obtain other dependent packages + TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE + .getEPackage(TypesPackage.eNS_URI); UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); // Create type parameters @@ -226,29 +324,84 @@ public class UML2CompareTestProfilePackageImpl extends EPackageImpl implements U // Add supertypes to classes // Initialize classes and features; add operations and parameters - initEClass(aClicheEClass, ACliche.class, "ACliche", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getACliche_SingleValuedAttribute(), ecorePackage.getEString(), - "singleValuedAttribute", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ - IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEAttribute(getACliche_ManyValuedAttribute(), ecorePackage.getEString(), - "manyValuedAttribute", //$NON-NLS-1$ - null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, - !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getACliche_SingleValuedReference(), theUMLPackage.getClass_(), null, - "singleValuedReference", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ - IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - !IS_ORDERED); - initEReference(getACliche_ManyValuedReference(), theUMLPackage.getClass_(), null, - "manyValuedReference", null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ - IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEReference(getACliche_Base_Class(), theUMLPackage.getClass_(), null, "base_Class", null, 1, 1, //$NON-NLS-1$ - ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEClass(aClicheEClass, ACliche.class, + "ACliche", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getACliche_SingleValuedAttribute(), + theTypesPackage.getString(), + "singleValuedAttribute", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getACliche_ManyValuedAttribute(), + theTypesPackage.getString(), + "manyValuedAttribute", null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche_SingleValuedReference(), + theUMLPackage.getClass_(), + null, + "singleValuedReference", null, 0, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche_ManyValuedReference(), + theUMLPackage.getClass_(), + null, + "manyValuedReference", null, 0, -1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche_Base_Class(), + theUMLPackage.getClass_(), + null, + "base_Class", null, 1, 1, ACliche.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(aCliche2EClass, ACliche2.class, + "ACliche2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getACliche2_SingleValuedAttribute(), + theTypesPackage.getString(), + "singleValuedAttribute", null, 0, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getACliche2_ManyValuedAttribute(), + theTypesPackage.getString(), + "manyValuedAttribute", null, 0, -1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche2_SingleValuedReference(), + theUMLPackage.getClass_(), + null, + "singleValuedReference", null, 0, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche2_ManyValuedReference(), + theUMLPackage.getClass_(), + null, + "manyValuedReference", null, 0, -1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getACliche2_Base_Class(), + theUMLPackage.getClass_(), + null, + "base_Class", null, 1, 1, ACliche2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + + initEClass(aCliche3EClass, ACliche3.class, + "ACliche3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getACliche3_Base_Class(), + theUMLPackage.getClass_(), + null, + "base_Class", null, 1, 1, ACliche3.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ // Create resource createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/uml2/2.0.0/UML + createUMLAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/uml2/2.0.0/UML. + * + * + * @generated + */ + protected void createUMLAnnotations() { + String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$ + addAnnotation(this, source, new String[] {"originalName", "UML2CompareTestProfile" //$NON-NLS-1$ //$NON-NLS-2$ + }); } } // UML2CompareTestProfilePackageImpl diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java index d894f2d45..5db335f2f 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,7 @@ package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util; 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.compare.uml2.profile.test.uml2comparetestprofile.*; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; import org.eclipse.emf.ecore.EObject; @@ -75,6 +76,16 @@ public class UML2CompareTestProfileAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseACliche2(ACliche2 object) { + return createACliche2Adapter(); + } + + @Override + public Adapter caseACliche3(ACliche3 object) { + return createACliche3Adapter(); + } + + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -108,6 +119,34 @@ public class UML2CompareTestProfileAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2 ACliche2}'. + * 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.compare.uml2.profile.test.uml2comparetestprofile.ACliche2 + * @generated + */ + public Adapter createACliche2Adapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3 ACliche3}'. + * 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.compare.uml2.profile.test.uml2comparetestprofile.ACliche3 + * @generated + */ + public Adapter createACliche3Adapter() { + return null; + } + + /** * Creates a new adapter for the default case. This default implementation returns * null. * diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileSwitch.java b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileSwitch.java index 5edeed3bc..daf10ba5b 100644 --- a/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileSwitch.java +++ b/plugins/org.eclipse.emf.compare.uml2.tests/profile/org/eclipse/emf/compare/uml2/profile/test/uml2comparetestprofile/util/UML2CompareTestProfileSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Obeo. + * Copyright (c) 2011, 2014 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,33 +10,33 @@ *******************************************************************************/ package org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.util; -import java.util.List; - import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche2; +import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.ACliche3; import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage; -import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.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.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage * @generated */ -public class UML2CompareTestProfileSwitch { +public class UML2CompareTestProfileSwitch extends Switch { /** - * The cached model package - * + * The cached model package + * * @generated */ protected static UML2CompareTestProfilePackage modelPackage; /** - * Creates an instance of the switch. - * + * Creates an instance of the switch. + * * @generated */ public UML2CompareTestProfileSwitch() { @@ -46,61 +46,55 @@ public class UML2CompareTestProfileSwitch { } /** - * 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 - */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * 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. + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. * @generated */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } else { - List eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); - } + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; } /** - * 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 */ + @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case UML2CompareTestProfilePackage.ACLICHE: { ACliche aCliche = (ACliche)theEObject; T result = caseACliche(aCliche); - if (result == null) { - result = defaultCase(theEObject); - } + if (result == null) result = defaultCase(theEObject); + return result; + } + case UML2CompareTestProfilePackage.ACLICHE2: { + ACliche2 aCliche2 = (ACliche2)theEObject; + T result = caseACliche2(aCliche2); + if (result == null) result = defaultCase(theEObject); + return result; + } + case UML2CompareTestProfilePackage.ACLICHE3: { + ACliche3 aCliche3 = (ACliche3)theEObject; + T result = caseACliche3(aCliche3); + if (result == null) result = defaultCase(theEObject); return result; } - default: - return defaultCase(theEObject); + default: return defaultCase(theEObject); } } /** - * Returns the result of interpreting the object as an instance of 'ACliche'. This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'ACliche'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -110,16 +104,46 @@ public class UML2CompareTestProfileSwitch { } /** - * 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. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'ACliche2'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseACliche2(ACliche2 object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'ACliche3'. + * + * 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 'ACliche3'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseACliche3(ACliche3 object) { + return null; + } + + /** + * 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. + * @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 */ + @Override public T defaultCase(EObject object) { return null; } -- 2.11.4.GIT