| /******************************************************************************* |
| * 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 v1.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.ecl.model.TeslaPackage; |
| import org.eclipse.rcptt.tesla.ecl.model.VerifyFalse; |
| |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.rcptt.ecl.core.impl.CommandImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Verify False</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.VerifyFalseImpl#getCondition <em>Condition</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class VerifyFalseImpl extends CommandImpl implements VerifyFalse { |
| /** |
| * The cached value of the '{@link #getCondition() <em>Condition</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCondition() |
| * @generated |
| * @ordered |
| */ |
| protected EObject condition; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected VerifyFalseImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TeslaPackage.Literals.VERIFY_FALSE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject getCondition() { |
| if (condition != null && condition.eIsProxy()) { |
| InternalEObject oldCondition = (InternalEObject)condition; |
| condition = eResolveProxy(oldCondition); |
| if (condition != oldCondition) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TeslaPackage.VERIFY_FALSE__CONDITION, oldCondition, condition)); |
| } |
| } |
| return condition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject basicGetCondition() { |
| return condition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCondition(EObject newCondition) { |
| EObject oldCondition = condition; |
| condition = newCondition; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.VERIFY_FALSE__CONDITION, oldCondition, condition)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TeslaPackage.VERIFY_FALSE__CONDITION: |
| if (resolve) return getCondition(); |
| return basicGetCondition(); |
| } |
| 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.VERIFY_FALSE__CONDITION: |
| setCondition((EObject)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.VERIFY_FALSE__CONDITION: |
| setCondition((EObject)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.VERIFY_FALSE__CONDITION: |
| return condition != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //VerifyFalseImpl |