diff options
Diffstat (limited to 'extraplugins/qompass/designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/impl/ConfigurableElementInstanceImpl.java')
-rw-r--r-- | extraplugins/qompass/designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/impl/ConfigurableElementInstanceImpl.java | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/extraplugins/qompass/designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/impl/ConfigurableElementInstanceImpl.java b/extraplugins/qompass/designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/impl/ConfigurableElementInstanceImpl.java new file mode 100644 index 00000000000..fb9e509e607 --- /dev/null +++ b/extraplugins/qompass/designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/impl/ConfigurableElementInstanceImpl.java @@ -0,0 +1,166 @@ +/** + * 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: + * Ansgar Radermacher - Initial API and implementation + * + */ +package org.eclipse.papyrus.FCM.impl; + +import org.eclipse.emf.common.notify.Notification; +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.FCM.ConfigurableElementInstance; +import org.eclipse.papyrus.FCM.FCMPackage; +import org.eclipse.uml2.uml.InstanceSpecification; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Configurable Element Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.FCM.impl.ConfigurableElementInstanceImpl#getConfiguration <em>Configuration</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ConfigurableElementInstanceImpl extends EObjectImpl implements ConfigurableElementInstance { + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected InstanceSpecification configuration; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ConfigurableElementInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FCMPackage.Literals.CONFIGURABLE_ELEMENT_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public InstanceSpecification getConfiguration() { + if (configuration != null && configuration.eIsProxy()) { + InternalEObject oldConfiguration = (InternalEObject)configuration; + configuration = (InstanceSpecification)eResolveProxy(oldConfiguration); + if (configuration != oldConfiguration) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION, oldConfiguration, configuration)); + } + } + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public InstanceSpecification basicGetConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void setConfiguration(InstanceSpecification newConfiguration) { + InstanceSpecification oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION: + if (resolve) return getConfiguration(); + return basicGetConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION: + setConfiguration((InstanceSpecification)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION: + setConfiguration((InstanceSpecification)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FCMPackage.CONFIGURABLE_ELEMENT_INSTANCE__CONFIGURATION: + return configuration != null; + } + return super.eIsSet(featureID); + } + +} // ConfigurableElementInstanceImpl |