| /******************************************************************************* |
| * Copyright (c) 2009, 2014 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 |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.core.ecl.core.model.impl; |
| |
| import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; |
| import org.eclipse.rcptt.core.ecl.core.model.SetCommandsDelay; |
| |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| 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>Set Commands Delay</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.SetCommandsDelayImpl#getDelay <em>Delay</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class SetCommandsDelayImpl extends CommandImpl implements SetCommandsDelay { |
| /** |
| * The default value of the '{@link #getDelay() <em>Delay</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDelay() |
| * @generated |
| * @ordered |
| */ |
| protected static final int DELAY_EDEFAULT = 0; |
| |
| /** |
| * The cached value of the '{@link #getDelay() <em>Delay</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDelay() |
| * @generated |
| * @ordered |
| */ |
| protected int delay = DELAY_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected SetCommandsDelayImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return Q7CorePackage.Literals.SET_COMMANDS_DELAY; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int getDelay() { |
| return delay; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDelay(int newDelay) { |
| int oldDelay = delay; |
| delay = newDelay; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.SET_COMMANDS_DELAY__DELAY, oldDelay, delay)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case Q7CorePackage.SET_COMMANDS_DELAY__DELAY: |
| return getDelay(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case Q7CorePackage.SET_COMMANDS_DELAY__DELAY: |
| setDelay((Integer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case Q7CorePackage.SET_COMMANDS_DELAY__DELAY: |
| setDelay(DELAY_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case Q7CorePackage.SET_COMMANDS_DELAY__DELAY: |
| return delay != DELAY_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(" (delay: "); |
| result.append(delay); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //SetCommandsDelayImpl |