| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id$ |
| */ |
| package test.impl; |
| |
| import org.eclipse.egf.model.fcore.Activity; |
| |
| 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 test.EGFTestCase; |
| import test.TestPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>EGF Test Case</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link test.impl.EGFTestCaseImpl#getActivity <em>Activity</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class EGFTestCaseImpl extends TestCaseImpl implements EGFTestCase { |
| /** |
| * The cached value of the '{@link #getActivity() <em>Activity</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getActivity() |
| * @generated |
| * @ordered |
| */ |
| protected Activity activity; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EGFTestCaseImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TestPackage.Literals.EGF_TEST_CASE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Activity getActivity() { |
| if (activity != null && activity.eIsProxy()) { |
| InternalEObject oldActivity = (InternalEObject)activity; |
| activity = (Activity)eResolveProxy(oldActivity); |
| if (activity != oldActivity) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TestPackage.EGF_TEST_CASE__ACTIVITY, oldActivity, activity)); |
| } |
| } |
| return activity; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Activity basicGetActivity() { |
| return activity; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setActivity(Activity newActivity) { |
| Activity oldActivity = activity; |
| activity = newActivity; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.EGF_TEST_CASE__ACTIVITY, oldActivity, activity)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TestPackage.EGF_TEST_CASE__ACTIVITY: |
| if (resolve) return getActivity(); |
| return basicGetActivity(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case TestPackage.EGF_TEST_CASE__ACTIVITY: |
| setActivity((Activity)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TestPackage.EGF_TEST_CASE__ACTIVITY: |
| setActivity((Activity)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TestPackage.EGF_TEST_CASE__ACTIVITY: |
| return activity != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //EGFTestCaseImpl |