diff options
Diffstat (limited to 'extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/ApplicationDependantElementImpl.java')
-rw-r--r-- | extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/ApplicationDependantElementImpl.java | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/ApplicationDependantElementImpl.java b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/ApplicationDependantElementImpl.java new file mode 100644 index 00000000000..1eb10585873 --- /dev/null +++ b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/ApplicationDependantElementImpl.java @@ -0,0 +1,167 @@ +/******************************************************************************* + * 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: + * Cedric Dumoulin - cedric.dumoulin@lifl.fr + ******************************************************************************/ +/** + */ +package org.eclipse.papyrus.layers.stackmodel.layers.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.MinimalEObjectImpl; + +import org.eclipse.papyrus.layers.stackmodel.layers.ApplicationDependantElement; +import org.eclipse.papyrus.layers.stackmodel.layers.LayersPackage; +import org.eclipse.papyrus.layers.stackmodel.layers.LayersStackApplication; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Application Dependant Element</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.layers.stackmodel.layers.impl.ApplicationDependantElementImpl#getApplication <em>Application</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class ApplicationDependantElementImpl extends MinimalEObjectImpl.Container implements ApplicationDependantElement { + /** + * The cached value of the '{@link #getApplication() <em>Application</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApplication() + * @generated + * @ordered + */ + protected LayersStackApplication application; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ApplicationDependantElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LayersPackage.Literals.APPLICATION_DEPENDANT_ELEMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LayersStackApplication getApplication() { + if (application != null && application.eIsProxy()) { + InternalEObject oldApplication = (InternalEObject)application; + application = (LayersStackApplication)eResolveProxy(oldApplication); + if (application != oldApplication) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION, oldApplication, application)); + } + } + return application; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LayersStackApplication basicGetApplication() { + return application; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setApplication(LayersStackApplication newApplication) { + LayersStackApplication oldApplication = application; + application = newApplication; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION, oldApplication, application)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION: + if (resolve) return getApplication(); + return basicGetApplication(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION: + setApplication((LayersStackApplication)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION: + setApplication((LayersStackApplication)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LayersPackage.APPLICATION_DEPENDANT_ELEMENT__APPLICATION: + return application != null; + } + return super.eIsSet(featureID); + } + +} //ApplicationDependantElementImpl |