| /** |
| * Copyright (c) 2014 CEA LIST. |
| * |
| * 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: |
| * CEA LIST - Initial API and implementation |
| */ |
| package org.eclipse.papyrus.dd.dg.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.papyrus.dd.dg.DGPackage; |
| import org.eclipse.papyrus.dd.dg.PathCommand; |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Path Command</b></em>'. <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.dd.dg.impl.PathCommandImpl#isRelative <em>Is Relative</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class PathCommandImpl extends MinimalEObjectImpl.Container implements PathCommand { |
| |
| /** |
| * The default value of the '{@link #isRelative() <em>Is Relative</em>}' attribute. |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #isRelative() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_RELATIVE_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isRelative() <em>Is Relative</em>}' attribute. |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #isRelative() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isRelative = IS_RELATIVE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected PathCommandImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return DGPackage.Literals.PATH_COMMAND; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public boolean isRelative() { |
| return isRelative; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setIsRelative(boolean newIsRelative) { |
| boolean oldIsRelative = isRelative; |
| isRelative = newIsRelative; |
| if(eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DGPackage.PATH_COMMAND__IS_RELATIVE, oldIsRelative, isRelative)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch(featureID) { |
| case DGPackage.PATH_COMMAND__IS_RELATIVE: |
| return isRelative(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch(featureID) { |
| case DGPackage.PATH_COMMAND__IS_RELATIVE: |
| setIsRelative((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch(featureID) { |
| case DGPackage.PATH_COMMAND__IS_RELATIVE: |
| setIsRelative(IS_RELATIVE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch(featureID) { |
| case DGPackage.PATH_COMMAND__IS_RELATIVE: |
| return isRelative != IS_RELATIVE_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(" (isRelative: "); |
| result.append(isRelative); |
| result.append(')'); |
| return result.toString(); |
| } |
| } // PathCommandImpl |