blob: d2749a59dd1ee7010263fa6c2b5c430247b8b507 [file] [log] [blame]
/**
* 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.ActionInclude;
import org.eclipse.osbp.xtext.action.ActionToolbar;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Action Include</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.xtext.action.impl.ActionIncludeImpl#getInclude <em>Include</em>}</li>
* </ul>
*
* @generated
*/
public class ActionIncludeImpl extends ActionBaseImpl implements ActionInclude {
/**
* The cached value of the '{@link #getInclude() <em>Include</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInclude()
* @generated
* @ordered
*/
protected ActionToolbar include;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ActionIncludeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ActionDSLPackage.Literals.ACTION_INCLUDE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionToolbar getInclude() {
if (include != null && include.eIsProxy()) {
InternalEObject oldInclude = (InternalEObject)include;
include = (ActionToolbar)eResolveProxy(oldInclude);
if (include != oldInclude) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActionDSLPackage.ACTION_INCLUDE__INCLUDE, oldInclude, include));
}
}
return include;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionToolbar basicGetInclude() {
return include;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setInclude(ActionToolbar newInclude) {
ActionToolbar oldInclude = include;
include = newInclude;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ActionDSLPackage.ACTION_INCLUDE__INCLUDE, oldInclude, include));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ActionDSLPackage.ACTION_INCLUDE__INCLUDE:
if (resolve) return getInclude();
return basicGetInclude();
}
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_INCLUDE__INCLUDE:
setInclude((ActionToolbar)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ActionDSLPackage.ACTION_INCLUDE__INCLUDE:
setInclude((ActionToolbar)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ActionDSLPackage.ACTION_INCLUDE__INCLUDE:
return include != null;
}
return super.eIsSet(featureID);
}
} //ActionIncludeImpl