diff options
Diffstat (limited to 'plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations/src-gen/org/eclipse/papyrus/uml/tools/elementtypesconfigurations/applystereotypeadviceconfiguration/impl/FeatureToSetImpl.java')
1 files changed, 254 insertions, 254 deletions
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations/src-gen/org/eclipse/papyrus/uml/tools/elementtypesconfigurations/applystereotypeadviceconfiguration/impl/FeatureToSetImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations/src-gen/org/eclipse/papyrus/uml/tools/elementtypesconfigurations/applystereotypeadviceconfiguration/impl/FeatureToSetImpl.java index 3c005eb2d5e..9d86e49679f 100644 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations/src-gen/org/eclipse/papyrus/uml/tools/elementtypesconfigurations/applystereotypeadviceconfiguration/impl/FeatureToSetImpl.java +++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.elementtypesconfigurations/src-gen/org/eclipse/papyrus/uml/tools/elementtypesconfigurations/applystereotypeadviceconfiguration/impl/FeatureToSetImpl.java @@ -1,254 +1,254 @@ -/**
- * Copyright (c) 2014 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.elementtypesconfigurations.applystereotypeadviceconfiguration.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-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;
-
-import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.ApplyStereotypeAdviceConfigurationPackage;
-import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.FeatureToSet;
-import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.FeatureValue;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Feature To Set</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.impl.FeatureToSetImpl#getFeatureName <em>Feature Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.impl.FeatureToSetImpl#getValue <em>Value</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
- /**
- * The default value of the '{@link #getFeatureName() <em>Feature Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFeatureName()
- * @generated
- * @ordered
- */
- protected static final String FEATURE_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getFeatureName() <em>Feature Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFeatureName()
- * @generated
- * @ordered
- */
- protected String featureName = FEATURE_NAME_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected FeatureValue value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected FeatureToSetImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ApplyStereotypeAdviceConfigurationPackage.Literals.FEATURE_TO_SET;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getFeatureName() {
- return featureName;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setFeatureName(String newFeatureName) {
- String oldFeatureName = featureName;
- featureName = newFeatureName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME, oldFeatureName, featureName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureValue getValue() {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetValue(FeatureValue newValue, NotificationChain msgs) {
- FeatureValue oldValue = value;
- value = newValue;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, oldValue, newValue);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setValue(FeatureValue newValue) {
- if (newValue != value) {
- NotificationChain msgs = null;
- if (value != null)
- msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs);
- if (newValue != null)
- msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs);
- msgs = basicSetValue(newValue, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, newValue, newValue));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE:
- return basicSetValue(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
- return getFeatureName();
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE:
- return getValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
- setFeatureName((String)newValue);
- return;
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE:
- setValue((FeatureValue)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
- setFeatureName(FEATURE_NAME_EDEFAULT);
- return;
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE:
- setValue((FeatureValue)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
- return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName);
- case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE:
- return value != null;
- }
- 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(" (featureName: ");
- result.append(featureName);
- result.append(')');
- return result.toString();
- }
-
-} //FeatureToSetImpl
+/** + * Copyright (c) 2014 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.elementtypesconfigurations.applystereotypeadviceconfiguration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +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; + +import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.ApplyStereotypeAdviceConfigurationPackage; +import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.FeatureToSet; +import org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.FeatureValue; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Feature To Set</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.impl.FeatureToSetImpl#getFeatureName <em>Feature Name</em>}</li> + * <li>{@link org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration.impl.FeatureToSetImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet { + /** + * The default value of the '{@link #getFeatureName() <em>Feature Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeatureName() + * @generated + * @ordered + */ + protected static final String FEATURE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFeatureName() <em>Feature Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeatureName() + * @generated + * @ordered + */ + protected String featureName = FEATURE_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected FeatureValue value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FeatureToSetImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ApplyStereotypeAdviceConfigurationPackage.Literals.FEATURE_TO_SET; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFeatureName() { + return featureName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFeatureName(String newFeatureName) { + String oldFeatureName = featureName; + featureName = newFeatureName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME, oldFeatureName, featureName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FeatureValue getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetValue(FeatureValue newValue, NotificationChain msgs) { + FeatureValue oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, oldValue, newValue); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(FeatureValue newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE, newValue, newValue)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE: + return basicSetValue(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return getFeatureName(); + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName((String)newValue); + return; + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + setFeatureName(FEATURE_NAME_EDEFAULT); + return; + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE: + setValue((FeatureValue)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME: + return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName); + case ApplyStereotypeAdviceConfigurationPackage.FEATURE_TO_SET__VALUE: + return value != null; + } + 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(" (featureName: "); + result.append(featureName); + result.append(')'); + return result.toString(); + } + +} //FeatureToSetImpl |