blob: 7b590c566153faac2113042e4a243ac6841f6316 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2019 Xored Software Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.tesla.ecl.model.impl;
import org.eclipse.rcptt.tesla.core.info.AdvancedInformation;
import org.eclipse.rcptt.tesla.ecl.model.TeslaPackage;
import org.eclipse.rcptt.tesla.ecl.model.TeslaProcessStatus;
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.rcptt.ecl.core.impl.ProcessStatusImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Process Status</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.TeslaProcessStatusImpl#getInfo <em>Info</em>}</li>
* </ul>
*
* @generated
*/
public class TeslaProcessStatusImpl extends ProcessStatusImpl implements TeslaProcessStatus {
/**
* The cached value of the '{@link #getInfo() <em>Info</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInfo()
* @generated
* @ordered
*/
protected AdvancedInformation info;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TeslaProcessStatusImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return TeslaPackage.Literals.TESLA_PROCESS_STATUS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AdvancedInformation getInfo() {
return info;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetInfo(AdvancedInformation newInfo, NotificationChain msgs) {
AdvancedInformation oldInfo = info;
info = newInfo;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TeslaPackage.TESLA_PROCESS_STATUS__INFO, oldInfo, newInfo);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setInfo(AdvancedInformation newInfo) {
if (newInfo != info) {
NotificationChain msgs = null;
if (info != null)
msgs = ((InternalEObject)info).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TeslaPackage.TESLA_PROCESS_STATUS__INFO, null, msgs);
if (newInfo != null)
msgs = ((InternalEObject)newInfo).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TeslaPackage.TESLA_PROCESS_STATUS__INFO, null, msgs);
msgs = basicSetInfo(newInfo, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.TESLA_PROCESS_STATUS__INFO, newInfo, newInfo));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case TeslaPackage.TESLA_PROCESS_STATUS__INFO:
return basicSetInfo(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 TeslaPackage.TESLA_PROCESS_STATUS__INFO:
return getInfo();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TeslaPackage.TESLA_PROCESS_STATUS__INFO:
setInfo((AdvancedInformation)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case TeslaPackage.TESLA_PROCESS_STATUS__INFO:
setInfo((AdvancedInformation)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case TeslaPackage.TESLA_PROCESS_STATUS__INFO:
return info != null;
}
return super.eIsSet(featureID);
}
} //TeslaProcessStatusImpl