| /** |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| * generated from ActionDSL.xcore |
| * |
| * |
| */ |
| package org.eclipse.osbp.xtext.action.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.osbp.xtext.action.ActionDSLPackage; |
| import org.eclipse.osbp.xtext.action.ActionParameter; |
| |
| import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryParameter; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Action Parameter</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.action.impl.ActionParameterImpl#getParameter <em>Parameter</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ActionParameterImpl extends ActionBaseImpl implements ActionParameter { |
| /** |
| * The cached value of the '{@link #getParameter() <em>Parameter</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getParameter() |
| * @generated |
| * @ordered |
| */ |
| protected FunctionLibraryParameter parameter; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ActionParameterImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ActionDSLPackage.Literals.ACTION_PARAMETER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionLibraryParameter getParameter() { |
| if (parameter != null && parameter.eIsProxy()) { |
| InternalEObject oldParameter = (InternalEObject)parameter; |
| parameter = (FunctionLibraryParameter)eResolveProxy(oldParameter); |
| if (parameter != oldParameter) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActionDSLPackage.ACTION_PARAMETER__PARAMETER, oldParameter, parameter)); |
| } |
| } |
| return parameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionLibraryParameter basicGetParameter() { |
| return parameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setParameter(FunctionLibraryParameter newParameter) { |
| FunctionLibraryParameter oldParameter = parameter; |
| parameter = newParameter; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ActionDSLPackage.ACTION_PARAMETER__PARAMETER, oldParameter, parameter)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_PARAMETER__PARAMETER: |
| if (resolve) return getParameter(); |
| return basicGetParameter(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_PARAMETER__PARAMETER: |
| setParameter((FunctionLibraryParameter)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_PARAMETER__PARAMETER: |
| setParameter((FunctionLibraryParameter)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_PARAMETER__PARAMETER: |
| return parameter != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ActionParameterImpl |