diff options
author | Remi Schnekenburger | 2015-02-02 16:51:57 +0000 |
---|---|---|
committer | Remi Schnekenburger | 2015-02-13 18:33:10 +0000 |
commit | f8ccc260f9c90a0724ef6bd4d62394eedf32f59d (patch) | |
tree | 325e3af1638ff25fe67981bf1180fa5601aad972 /plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes | |
parent | b1c3dbffb61c877190e1aa504f7f6171ace3d06e (diff) | |
download | org.eclipse.papyrus-f8ccc260f9c90a0724ef6bd4d62394eedf32f59d.tar.gz org.eclipse.papyrus-f8ccc260f9c90a0724ef6bd4d62394eedf32f59d.tar.xz org.eclipse.papyrus-f8ccc260f9c90a0724ef6bd4d62394eedf32f59d.zip |
Bug 454455: [ExtendedTypes] Performance issue when using
InvariantContainerConfiguration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=454455
- fixes performances issues on the invariant container matcher and
container descriptor matcher
- integrates contribution from Sebastien Gabel on Invariant Stereotype
configuration matcher (isStrict has been added) - see contribution
gerrit 35580 (https://git.eclipse.org/r/#/c/35580/)
- integrates contribution from Sebastien Gabel on Invariant Container
configuration - see contribution gerrit 37023
(https://git.eclipse.org/r/#/c/37023 )
Cherry pick from contribution in maintenance/luna branch
Conflicts:
plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerMatcher.java
plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/invariantcontainerconfiguration/InvariantContainerUtils.java
plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
Change-Id: Ie0668715cb204f9382330f34a2e264386b3c33b6
Signed-off-by: Remi Schnekenburger <remi.schnekenburger@cea.fr>
Diffstat (limited to 'plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes')
7 files changed, 982 insertions, 790 deletions
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF index 0854fe9ff27..835d7533b07 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF @@ -1,32 +1,37 @@ -Manifest-Version: 1.0
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0";visibility:=reexport,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.extendedtypes.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.swt,
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.uml.tools.extendedtypes,
- org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration,
- org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl,
- org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activato
- r$Implementation
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singl
- eton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.uml.tools.extendedtypes, + org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl, + org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0";visibility:=reexport, + org.eclipse.uml2.uml, + org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0", + org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0", + org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0", + org.eclipse.papyrus.infra.extendedtypes.emf;bundle-version="1.1.0", + org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0", + org.eclipse.swt, + org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0", + org.eclipse.papyrus.uml.properties;bundle-version="1.1.0", + org.eclipse.papyrus.views.properties;bundle-version="1.1.0" +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.1.0.qualifier +Bundle-Localization: plugin +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activator$Implementation +Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore index 7a0216a825f..5a2d4a135c6 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/InvariantStereotypeConfiguration.ecore @@ -6,5 +6,6 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="stereotypeQualifiedName" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="requiredProfile" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="strict" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> </eClassifiers> </ecore:EPackage> diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java index 31f2e4fd2d0..f08de0c6f60 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfiguration.java @@ -1,91 +1,120 @@ -/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration;
-
-import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Invariant Stereotype Configuration</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration()
- * @model
- * @generated
- */
-public interface InvariantStereotypeConfiguration extends InvariantRuleConfiguration {
-
- /**
- * Returns the value of the '<em><b>Stereotype Qualified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Stereotype Qualified Name</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Stereotype Qualified Name</em>' attribute.
- * @see #setStereotypeQualifiedName(String)
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_StereotypeQualifiedName()
- * @model required="true"
- * @generated
- */
- String getStereotypeQualifiedName();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Stereotype Qualified Name</em>' attribute.
- * @see #getStereotypeQualifiedName()
- * @generated
- */
- void setStereotypeQualifiedName(String value);
-
- /**
- * Returns the value of the '<em><b>Required Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Required Profile</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Required Profile</em>' attribute.
- * @see #setRequiredProfile(String)
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_RequiredProfile()
- * @model
- * @generated
- */
- String getRequiredProfile();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Required Profile</em>' attribute.
- * @see #getRequiredProfile()
- * @generated
- */
- void setRequiredProfile(String value);
-} // InvariantStereotypeConfiguration
+/** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantRuleConfiguration; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Invariant Stereotype Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#isStrict <em>Strict</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration() + * @model + * @generated + */ +public interface InvariantStereotypeConfiguration extends InvariantRuleConfiguration { + + /** + * Returns the value of the '<em><b>Stereotype Qualified Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Stereotype Qualified Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Stereotype Qualified Name</em>' attribute. + * @see #setStereotypeQualifiedName(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_StereotypeQualifiedName() + * @model required="true" + * @generated + */ + String getStereotypeQualifiedName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Stereotype Qualified Name</em>' attribute. + * @see #getStereotypeQualifiedName() + * @generated + */ + void setStereotypeQualifiedName(String value); + + /** + * Returns the value of the '<em><b>Required Profile</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Required Profile</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Required Profile</em>' attribute. + * @see #setRequiredProfile(String) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_RequiredProfile() + * @model + * @generated + */ + String getRequiredProfile(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Required Profile</em>' attribute. + * @see #getRequiredProfile() + * @generated + */ + void setRequiredProfile(String value); + + /** + * Returns the value of the '<em><b>Strict</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Strict</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Strict</em>' attribute. + * @see #setStrict(boolean) + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#getInvariantStereotypeConfiguration_Strict() + * @model + * @generated + */ + boolean isStrict(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#isStrict <em>Strict</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Strict</em>' attribute. + * @see #isStrict() + * @generated + */ + void setStrict(boolean value); +} // InvariantStereotypeConfiguration diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java index ff7ce3ad3c6..a01c46df0c8 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeConfigurationPackage.java @@ -1,216 +1,247 @@ -/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage;
-
-/**
- * <!-- 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 operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory
- * @model kind="package"
- * @generated
- */
-public interface InvariantStereotypeConfigurationPackage extends EPackage {
-
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- String eNAME = "invariantstereotypeconfiguration";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/stereotype/1.0";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_PREFIX = "invariantstereotypeconfiguration";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- InvariantStereotypeConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl <em>Invariant Stereotype Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration()
- * @generated
- */
- int INVARIANT_STEREOTYPE_CONFIGURATION = 0;
-
- /**
- * The feature id for the '<em><b>Stereotype Qualified Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Required Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Invariant Stereotype Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int INVARIANT_STEREOTYPE_CONFIGURATION_FEATURE_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 2;
-
- /**
- * The number of operations of the '<em>Invariant Stereotype Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int INVARIANT_STEREOTYPE_CONFIGURATION_OPERATION_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT + 0;
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration <em>Invariant Stereotype Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Invariant Stereotype Configuration</em>'.
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration
- * @generated
- */
- EClass getInvariantStereotypeConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Stereotype Qualified Name</em>'.
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName()
- * @see #getInvariantStereotypeConfiguration()
- * @generated
- */
- EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Required Profile</em>'.
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile()
- * @see #getInvariantStereotypeConfiguration()
- * @generated
- */
- EAttribute getInvariantStereotypeConfiguration_RequiredProfile();
-
- /**
- * 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
- */
- InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory();
-
- /**
- * <!-- 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 operation 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.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl <em>Invariant Stereotype Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration()
- * @generated
- */
- EClass INVARIANT_STEREOTYPE_CONFIGURATION = eINSTANCE.getInvariantStereotypeConfiguration();
-
- /**
- * The meta object literal for the '<em><b>Stereotype Qualified Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = eINSTANCE.getInvariantStereotypeConfiguration_StereotypeQualifiedName();
-
- /**
- * The meta object literal for the '<em><b>Required Profile</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = eINSTANCE.getInvariantStereotypeConfiguration_RequiredProfile();
- }
-} // InvariantStereotypeConfigurationPackage
+/** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; + +/** + * <!-- 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 operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory + * @model kind="package" + * @generated + */ +public interface InvariantStereotypeConfigurationPackage extends EPackage { + + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "invariantstereotypeconfiguration"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/stereotype/1.0"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "invariantstereotypeconfiguration"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + InvariantStereotypeConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl <em>Invariant Stereotype Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration() + * @generated + */ + int INVARIANT_STEREOTYPE_CONFIGURATION = 0; + + /** + * The feature id for the '<em><b>Stereotype Qualified Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Required Profile</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Strict</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION__STRICT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Invariant Stereotype Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION_FEATURE_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Invariant Stereotype Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INVARIANT_STEREOTYPE_CONFIGURATION_OPERATION_COUNT = InvariantSemanticTypeConfigurationPackage.INVARIANT_RULE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration <em>Invariant Stereotype Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Invariant Stereotype Configuration</em>'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration + * @generated + */ + EClass getInvariantStereotypeConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Stereotype Qualified Name</em>'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getStereotypeQualifiedName() + * @see #getInvariantStereotypeConfiguration() + * @generated + */ + EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile <em>Required Profile</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Required Profile</em>'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#getRequiredProfile() + * @see #getInvariantStereotypeConfiguration() + * @generated + */ + EAttribute getInvariantStereotypeConfiguration_RequiredProfile(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#isStrict <em>Strict</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Strict</em>'. + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration#isStrict() + * @see #getInvariantStereotypeConfiguration() + * @generated + */ + EAttribute getInvariantStereotypeConfiguration_Strict(); + + /** + * 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 + */ + InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory(); + + /** + * <!-- 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 operation 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.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl <em>Invariant Stereotype Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationPackageImpl#getInvariantStereotypeConfiguration() + * @generated + */ + EClass INVARIANT_STEREOTYPE_CONFIGURATION = eINSTANCE.getInvariantStereotypeConfiguration(); + + /** + * The meta object literal for the '<em><b>Stereotype Qualified Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME = eINSTANCE.getInvariantStereotypeConfiguration_StereotypeQualifiedName(); + + /** + * The meta object literal for the '<em><b>Required Profile</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE = eINSTANCE.getInvariantStereotypeConfiguration_RequiredProfile(); + + /** + * The meta object literal for the '<em><b>Strict</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EAttribute INVARIANT_STEREOTYPE_CONFIGURATION__STRICT = eINSTANCE.getInvariantStereotypeConfiguration_Strict(); + } +} // InvariantStereotypeConfigurationPackage diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java index 0d5323359e5..7c668b1054d 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationImpl.java @@ -1,242 +1,302 @@ -/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl;
-import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration;
-import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Invariant Stereotype Configuration</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getRequiredProfile <em>Required Profile</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class InvariantStereotypeConfigurationImpl extends InvariantRuleConfigurationImpl implements InvariantStereotypeConfiguration {
-
- /**
- * The default value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #getStereotypeQualifiedName()
- * @generated
- * @ordered
- */
- protected static final String STEREOTYPE_QUALIFIED_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #getStereotypeQualifiedName()
- * @generated
- * @ordered
- */
- protected String stereotypeQualifiedName = STEREOTYPE_QUALIFIED_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getRequiredProfile() <em>Required Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #getRequiredProfile()
- * @generated
- * @ordered
- */
- protected static final String REQUIRED_PROFILE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getRequiredProfile() <em>Required Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #getRequiredProfile()
- * @generated
- * @ordered
- */
- protected String requiredProfile = REQUIRED_PROFILE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected InvariantStereotypeConfigurationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return InvariantStereotypeConfigurationPackage.Literals.INVARIANT_STEREOTYPE_CONFIGURATION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public String getStereotypeQualifiedName() {
- return stereotypeQualifiedName;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public void setStereotypeQualifiedName(String newStereotypeQualifiedName) {
- String oldStereotypeQualifiedName = stereotypeQualifiedName;
- stereotypeQualifiedName = newStereotypeQualifiedName;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME, oldStereotypeQualifiedName, stereotypeQualifiedName));
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public String getRequiredProfile() {
- return requiredProfile;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public void setRequiredProfile(String newRequiredProfile) {
- String oldRequiredProfile = requiredProfile;
- requiredProfile = newRequiredProfile;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE, oldRequiredProfile, requiredProfile));
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME:
- return getStereotypeQualifiedName();
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE:
- return getRequiredProfile();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME:
- setStereotypeQualifiedName((String) newValue);
- return;
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE:
- setRequiredProfile((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME:
- setStereotypeQualifiedName(STEREOTYPE_QUALIFIED_NAME_EDEFAULT);
- return;
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE:
- setRequiredProfile(REQUIRED_PROFILE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME:
- return STEREOTYPE_QUALIFIED_NAME_EDEFAULT == null ? stereotypeQualifiedName != null : !STEREOTYPE_QUALIFIED_NAME_EDEFAULT.equals(stereotypeQualifiedName);
- case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE:
- return REQUIRED_PROFILE_EDEFAULT == null ? requiredProfile != null : !REQUIRED_PROFILE_EDEFAULT.equals(requiredProfile);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (stereotypeQualifiedName: ");
- result.append(stereotypeQualifiedName);
- result.append(", requiredProfile: ");
- result.append(requiredProfile);
- result.append(')');
- return result.toString();
- }
-} // InvariantStereotypeConfigurationImpl
+/** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.impl.InvariantRuleConfigurationImpl; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Invariant Stereotype Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#getRequiredProfile <em>Required Profile</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl.InvariantStereotypeConfigurationImpl#isStrict <em>Strict</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class InvariantStereotypeConfigurationImpl extends InvariantRuleConfigurationImpl implements InvariantStereotypeConfiguration { + + /** + * The default value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getStereotypeQualifiedName() + * @generated + * @ordered + */ + protected static final String STEREOTYPE_QUALIFIED_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getStereotypeQualifiedName() + * @generated + * @ordered + */ + protected String stereotypeQualifiedName = STEREOTYPE_QUALIFIED_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getRequiredProfile() <em>Required Profile</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRequiredProfile() + * @generated + * @ordered + */ + protected static final String REQUIRED_PROFILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRequiredProfile() <em>Required Profile</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getRequiredProfile() + * @generated + * @ordered + */ + protected String requiredProfile = REQUIRED_PROFILE_EDEFAULT; + + /** + * The default value of the '{@link #isStrict() <em>Strict</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isStrict() + * @generated + * @ordered + */ + protected static final boolean STRICT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isStrict() <em>Strict</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #isStrict() + * @generated + * @ordered + */ + protected boolean strict = STRICT_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected InvariantStereotypeConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return InvariantStereotypeConfigurationPackage.Literals.INVARIANT_STEREOTYPE_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String getStereotypeQualifiedName() { + return stereotypeQualifiedName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void setStereotypeQualifiedName(String newStereotypeQualifiedName) { + String oldStereotypeQualifiedName = stereotypeQualifiedName; + stereotypeQualifiedName = newStereotypeQualifiedName; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME, oldStereotypeQualifiedName, stereotypeQualifiedName)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public String getRequiredProfile() { + return requiredProfile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void setRequiredProfile(String newRequiredProfile) { + String oldRequiredProfile = requiredProfile; + requiredProfile = newRequiredProfile; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE, oldRequiredProfile, requiredProfile)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public boolean isStrict() { + return strict; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void setStrict(boolean newStrict) { + boolean oldStrict = strict; + strict = newStrict; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STRICT, oldStrict, strict)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + return getStereotypeQualifiedName(); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + return getRequiredProfile(); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STRICT: + return isStrict(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + setStereotypeQualifiedName((String) newValue); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + setRequiredProfile((String) newValue); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STRICT: + setStrict((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + setStereotypeQualifiedName(STEREOTYPE_QUALIFIED_NAME_EDEFAULT); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + setRequiredProfile(REQUIRED_PROFILE_EDEFAULT); + return; + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STRICT: + setStrict(STRICT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME: + return STEREOTYPE_QUALIFIED_NAME_EDEFAULT == null ? stereotypeQualifiedName != null : !STEREOTYPE_QUALIFIED_NAME_EDEFAULT.equals(stereotypeQualifiedName); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE: + return REQUIRED_PROFILE_EDEFAULT == null ? requiredProfile != null : !REQUIRED_PROFILE_EDEFAULT.equals(requiredProfile); + case InvariantStereotypeConfigurationPackage.INVARIANT_STEREOTYPE_CONFIGURATION__STRICT: + return strict != STRICT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stereotypeQualifiedName: "); + result.append(stereotypeQualifiedName); + result.append(", requiredProfile: "); + result.append(requiredProfile); + result.append(", strict: "); + result.append(strict); + result.append(')'); + return result.toString(); + } +} // InvariantStereotypeConfigurationImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java index b4bd2250c4a..8d6223d1611 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/impl/InvariantStereotypeConfigurationPackageImpl.java @@ -1,206 +1,236 @@ -/**
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage;
-import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration;
-import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory;
-import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class InvariantStereotypeConfigurationPackageImpl extends EPackageImpl implements InvariantStereotypeConfigurationPackage {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass invariantStereotypeConfigurationEClass = 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 -->
- *
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private InvariantStereotypeConfigurationPackageImpl() {
- super(eNS_URI, InvariantStereotypeConfigurationFactory.eINSTANCE);
- }
-
- /**
- * <!-- 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.
- *
- * <p>
- * This method is used to initialize {@link InvariantStereotypeConfigurationPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static InvariantStereotypeConfigurationPackage init() {
- if (isInited) {
- return (InvariantStereotypeConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(InvariantStereotypeConfigurationPackage.eNS_URI);
- }
- // Obtain or create and register package
- InvariantStereotypeConfigurationPackageImpl theInvariantStereotypeConfigurationPackage = (InvariantStereotypeConfigurationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InvariantStereotypeConfigurationPackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI) : new InvariantStereotypeConfigurationPackageImpl());
- isInited = true;
- // Initialize simple dependencies
- InvariantSemanticTypeConfigurationPackage.eINSTANCE.eClass();
- // Create package meta-data objects
- theInvariantStereotypeConfigurationPackage.createPackageContents();
- // Initialize created meta-data
- theInvariantStereotypeConfigurationPackage.initializePackageContents();
- // Mark meta-data to indicate it can't be changed
- theInvariantStereotypeConfigurationPackage.freeze();
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(InvariantStereotypeConfigurationPackage.eNS_URI, theInvariantStereotypeConfigurationPackage);
- return theInvariantStereotypeConfigurationPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getInvariantStereotypeConfiguration() {
- return invariantStereotypeConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName() {
- return (EAttribute) invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getInvariantStereotypeConfiguration_RequiredProfile() {
- return (EAttribute) invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory() {
- return (InvariantStereotypeConfigurationFactory) getEFactoryInstance();
- }
-
- /**
- * <!-- 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 -->
- *
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) {
- return;
- }
- isCreated = true;
- // Create classes and their features
- invariantStereotypeConfigurationEClass = createEClass(INVARIANT_STEREOTYPE_CONFIGURATION);
- createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME);
- createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE);
- }
-
- /**
- * <!-- 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 -->
- *
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) {
- return;
- }
- isInitialized = true;
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
- // Obtain other dependent packages
- InvariantSemanticTypeConfigurationPackage theInvariantSemanticTypeConfigurationPackage = (InvariantSemanticTypeConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(InvariantSemanticTypeConfigurationPackage.eNS_URI);
- EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- // Create type parameters
- // Set bounds for type parameters
- // Add supertypes to classes
- invariantStereotypeConfigurationEClass.getESuperTypes().add(theInvariantSemanticTypeConfigurationPackage.getInvariantRuleConfiguration());
- // Initialize classes, features, and operations; add parameters
- initEClass(invariantStereotypeConfigurationEClass, InvariantStereotypeConfiguration.class, "InvariantStereotypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getInvariantStereotypeConfiguration_StereotypeQualifiedName(), theEcorePackage.getEString(), "stereotypeQualifiedName", null, 1, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
- !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getInvariantStereotypeConfiguration_RequiredProfile(), theEcorePackage.getEString(), "requiredProfile", null, 0, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- // Create resource
- createResource(eNS_URI);
- }
-} // InvariantStereotypeConfigurationPackageImpl
+/** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.InvariantSemanticTypeConfigurationPackage; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfiguration; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationFactory; +import org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * + * @generated + */ +public class InvariantStereotypeConfigurationPackageImpl extends EPackageImpl implements InvariantStereotypeConfigurationPackage { + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + private EClass invariantStereotypeConfigurationEClass = 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 --> + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.InvariantStereotypeConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private InvariantStereotypeConfigurationPackageImpl() { + super(eNS_URI, InvariantStereotypeConfigurationFactory.eINSTANCE); + } + + /** + * <!-- 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. + * + * <p> + * This method is used to initialize {@link InvariantStereotypeConfigurationPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static InvariantStereotypeConfigurationPackage init() { + if (isInited) { + return (InvariantStereotypeConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(InvariantStereotypeConfigurationPackage.eNS_URI); + } + + // Obtain or create and register package + InvariantStereotypeConfigurationPackageImpl theInvariantStereotypeConfigurationPackage = (InvariantStereotypeConfigurationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InvariantStereotypeConfigurationPackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) + : new InvariantStereotypeConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + InvariantSemanticTypeConfigurationPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theInvariantStereotypeConfigurationPackage.createPackageContents(); + + // Initialize created meta-data + theInvariantStereotypeConfigurationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theInvariantStereotypeConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(InvariantStereotypeConfigurationPackage.eNS_URI, theInvariantStereotypeConfigurationPackage); + return theInvariantStereotypeConfigurationPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public EClass getInvariantStereotypeConfiguration() { + return invariantStereotypeConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getInvariantStereotypeConfiguration_StereotypeQualifiedName() { + return (EAttribute) invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getInvariantStereotypeConfiguration_RequiredProfile() { + return (EAttribute) invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getInvariantStereotypeConfiguration_Strict() { + return (EAttribute) invariantStereotypeConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public InvariantStereotypeConfigurationFactory getInvariantStereotypeConfigurationFactory() { + return (InvariantStereotypeConfigurationFactory) getEFactoryInstance(); + } + + /** + * <!-- 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 --> + * + * @generated + */ + public void createPackageContents() { + if (isCreated) { + return; + } + isCreated = true; + + // Create classes and their features + invariantStereotypeConfigurationEClass = createEClass(INVARIANT_STEREOTYPE_CONFIGURATION); + createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__STEREOTYPE_QUALIFIED_NAME); + createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__REQUIRED_PROFILE); + createEAttribute(invariantStereotypeConfigurationEClass, INVARIANT_STEREOTYPE_CONFIGURATION__STRICT); + } + + /** + * <!-- 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 --> + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + InvariantSemanticTypeConfigurationPackage theInvariantSemanticTypeConfigurationPackage = (InvariantSemanticTypeConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(InvariantSemanticTypeConfigurationPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + invariantStereotypeConfigurationEClass.getESuperTypes().add(theInvariantSemanticTypeConfigurationPackage.getInvariantRuleConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(invariantStereotypeConfigurationEClass, InvariantStereotypeConfiguration.class, "InvariantStereotypeConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInvariantStereotypeConfiguration_StereotypeQualifiedName(), theEcorePackage.getEString(), "stereotypeQualifiedName", null, 1, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getInvariantStereotypeConfiguration_RequiredProfile(), theEcorePackage.getEString(), "requiredProfile", null, 0, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getInvariantStereotypeConfiguration_Strict(), ecorePackage.getEBoolean(), "strict", null, 0, 1, InvariantStereotypeConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } +} // InvariantStereotypeConfigurationPackageImpl diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java index 6fdb6f10f60..ab7b2a4bf7a 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/invariantstereotypeconfiguration/InvariantStereotypeElementMatcher.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2014 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,12 +8,14 @@ * * Contributors: * Remi Schnekenburger (CEA LIST) - Initial API and implementation + * Sebastien Gabel (Esterel Technologies) - Add support to isStrict attribute * *****************************************************************************/ package org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration; import org.eclipse.emf.ecore.EObject; import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguration.IInvariantElementMatcher; +import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Stereotype; @@ -25,6 +27,8 @@ public class InvariantStereotypeElementMatcher implements IInvariantElementMatch private String stereotypeQualifiedName; + private boolean isStrict; + /** * {@inheritDoc} */ @@ -34,8 +38,23 @@ public class InvariantStereotypeElementMatcher implements IInvariantElementMatch return false; } - Stereotype appliedStereotype = ((Element) eObject).getAppliedStereotype(getStereotypeQualifiedName()); - return appliedStereotype != null; + String stereotypeQualifiedName = getStereotypeQualifiedName(); + if(stereotypeQualifiedName==null) { // to avoid null pointers + return false; + } + Stereotype appliedStereotype = ((Element) eObject).getAppliedStereotype(stereotypeQualifiedName); + if (appliedStereotype != null) { // one has been found, no need to get further + return true; + } else if(!isStrict) { // the stereotype does not match perfectly, but one of the applied stereotypes on the element could match if not strict + for (Stereotype stereotype : ((Element) eObject).getAppliedStereotypes()) { + for (Stereotype superStereotype : StereotypeUtil.getAllSuperStereotypes(stereotype)) { + if (stereotypeQualifiedName.equals(superStereotype.getQualifiedName())) { + return true; // there is a match in the super stereotypes. Finish here, element matches + } + } + } + } + return false; } /** @@ -43,6 +62,7 @@ public class InvariantStereotypeElementMatcher implements IInvariantElementMatch */ public void init(InvariantStereotypeConfiguration ruleConfiguration) { setStereotypeQualifiedName(ruleConfiguration.getStereotypeQualifiedName()); + setStrict(ruleConfiguration.isStrict()); } /** @@ -59,4 +79,20 @@ public class InvariantStereotypeElementMatcher implements IInvariantElementMatch public void setStereotypeQualifiedName(String stereotypeQualifiedName) { this.stereotypeQualifiedName = stereotypeQualifiedName; } + + + /** + * @return the isStrict + */ + public boolean isStrict() { + return isStrict; + } + + /** + * @param isStrict + * the isStrict to set + */ + public void setStrict(boolean isStrict) { + this.isStrict = isStrict; + } } |