blob: ed4da486610bb20239c062008e57dd741fa7f9b1 [file] [log] [blame]
/**
* Copyright (c) 2013, 2017 CEA LIST & LIFL
*
* 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 - Initial API and implementation
* Quentin Le Menez quentin.lemenez@cea.fr
*
*/
package org.eclipse.papyrus.internal.infra.gmfdiag.layers.model.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.EObjectImpl;
import org.eclipse.papyrus.internal.infra.gmfdiag.layers.model.layers.ApplicationDependantElement;
import org.eclipse.papyrus.internal.infra.gmfdiag.layers.model.layers.LayersPackage;
import org.eclipse.papyrus.internal.infra.gmfdiag.layers.model.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:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.internal.infra.gmfdiag.layers.model.layers.impl.ApplicationDependantElementImpl#getApplication <em>Application</em>}</li>
* </ul>
*
* @generated
*/
public abstract class ApplicationDependantElementImpl extends EObjectImpl 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