| /** |
| * 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.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.action.ActionDSLPackage; |
| import org.eclipse.osbp.xtext.action.ActionSpacer; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Action Spacer</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.action.impl.ActionSpacerImpl#isStretch <em>Stretch</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ActionSpacerImpl extends ActionBaseImpl implements ActionSpacer { |
| /** |
| * The default value of the '{@link #isStretch() <em>Stretch</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isStretch() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean STRETCH_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isStretch() <em>Stretch</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isStretch() |
| * @generated |
| * @ordered |
| */ |
| protected boolean stretch = STRETCH_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ActionSpacerImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ActionDSLPackage.Literals.ACTION_SPACER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isStretch() { |
| return stretch; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setStretch(boolean newStretch) { |
| boolean oldStretch = stretch; |
| stretch = newStretch; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ActionDSLPackage.ACTION_SPACER__STRETCH, oldStretch, stretch)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_SPACER__STRETCH: |
| return isStretch(); |
| } |
| 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_SPACER__STRETCH: |
| setStretch((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_SPACER__STRETCH: |
| setStretch(STRETCH_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ActionDSLPackage.ACTION_SPACER__STRETCH: |
| return stretch != STRETCH_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (stretch: "); |
| result.append(stretch); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ActionSpacerImpl |