/******************************************************************************* * Copyright (c) 2006, 2020 Borland Software Corporation, CEA LIST, ARTAL * * 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: * Borland - initial API and implementation * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174 ******************************************************************************/ /** * * * * $Id$ */ package org.eclipse.papyrus.gmf.tooldef.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.EObjectImpl; import org.eclipse.papyrus.gmf.tooldef.BundleImage; import org.eclipse.papyrus.gmf.tooldef.GMFToolPackage; /** * * An implementation of the model object 'Bundle Image'. * *

* The following features are implemented: *

*

* * @generated */ public class BundleImageImpl extends EObjectImpl implements BundleImage { /** * The default value of the '{@link #getPath() Path}' attribute. * * * @see #getPath() * @generated * @ordered */ protected static final String PATH_EDEFAULT = null; /** * The cached value of the '{@link #getPath() Path}' attribute. * * * @see #getPath() * @generated * @ordered */ protected String path = PATH_EDEFAULT; /** * The default value of the '{@link #getBundle() Bundle}' attribute. * * * @see #getBundle() * @generated * @ordered */ protected static final String BUNDLE_EDEFAULT = null; /** * The cached value of the '{@link #getBundle() Bundle}' attribute. * * * @see #getBundle() * @generated * @ordered */ protected String bundle = BUNDLE_EDEFAULT; /** * * * @generated */ protected BundleImageImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return GMFToolPackage.eINSTANCE.getBundleImage(); } /** * * * @generated */ public String getPath() { return path; } /** * * * @generated */ public void setPath(String newPath) { String oldPath = path; path = newPath; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GMFToolPackage.BUNDLE_IMAGE__PATH, oldPath, path)); } /** * * * @generated */ public String getBundle() { return bundle; } /** * * * @generated */ public void setBundle(String newBundle) { String oldBundle = bundle; bundle = newBundle; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GMFToolPackage.BUNDLE_IMAGE__BUNDLE, oldBundle, bundle)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case GMFToolPackage.BUNDLE_IMAGE__PATH: return getPath(); case GMFToolPackage.BUNDLE_IMAGE__BUNDLE: return getBundle(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case GMFToolPackage.BUNDLE_IMAGE__PATH: setPath((String) newValue); return; case GMFToolPackage.BUNDLE_IMAGE__BUNDLE: setBundle((String) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case GMFToolPackage.BUNDLE_IMAGE__PATH: setPath(PATH_EDEFAULT); return; case GMFToolPackage.BUNDLE_IMAGE__BUNDLE: setBundle(BUNDLE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case GMFToolPackage.BUNDLE_IMAGE__PATH: return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); case GMFToolPackage.BUNDLE_IMAGE__BUNDLE: return BUNDLE_EDEFAULT == null ? bundle != null : !BUNDLE_EDEFAULT.equals(bundle); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (path: "); result.append(path); result.append(", bundle: "); result.append(bundle); result.append(')'); return result.toString(); } } //BundleImageImpl