/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.papyrus.infra.extendedtypes.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.infra.extendedtypes.ExtendedtypesPackage; import org.eclipse.papyrus.infra.extendedtypes.IconEntry; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Icon Entry</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getIconPath <em>Icon Path</em>}</li> * <li>{@link org.eclipse.papyrus.infra.extendedtypes.impl.IconEntryImpl#getBundleId <em>Bundle Id</em>}</li> * </ul> * </p> * * @generated */ public class IconEntryImpl extends EObjectImpl implements IconEntry { /** * The default value of the '{@link #getIconPath() <em>Icon Path</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getIconPath() * @generated * @ordered */ protected static final String ICON_PATH_EDEFAULT = null; /** * The cached value of the '{@link #getIconPath() <em>Icon Path</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getIconPath() * @generated * @ordered */ protected String iconPath = ICON_PATH_EDEFAULT; /** * The default value of the '{@link #getBundleId() <em>Bundle Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getBundleId() * @generated * @ordered */ protected static final String BUNDLE_ID_EDEFAULT = null; /** * The cached value of the '{@link #getBundleId() <em>Bundle Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getBundleId() * @generated * @ordered */ protected String bundleId = BUNDLE_ID_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IconEntryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ExtendedtypesPackage.Literals.ICON_ENTRY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getIconPath() { return iconPath; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setIconPath(String newIconPath) { String oldIconPath = iconPath; iconPath = newIconPath; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ICON_ENTRY__ICON_PATH, oldIconPath, iconPath)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getBundleId() { return bundleId; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setBundleId(String newBundleId) { String oldBundleId = bundleId; bundleId = newBundleId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID, oldBundleId, bundleId)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: return getIconPath(); case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: return getBundleId(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: setIconPath((String)newValue); return; case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: setBundleId((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: setIconPath(ICON_PATH_EDEFAULT); return; case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: setBundleId(BUNDLE_ID_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ExtendedtypesPackage.ICON_ENTRY__ICON_PATH: return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath); case ExtendedtypesPackage.ICON_ENTRY__BUNDLE_ID: return BUNDLE_ID_EDEFAULT == null ? bundleId != null : !BUNDLE_ID_EDEFAULT.equals(bundleId); } 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(" (iconPath: "); result.append(iconPath); result.append(", bundleId: "); result.append(bundleId); result.append(')'); return result.toString(); } } //IconEntryImpl