/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.papyrus.uml.diagram.paletteconfiguration.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.uml.diagram.paletteconfiguration.IconDescriptor; import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Icon Descriptor</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getPluginID <em>Plugin ID</em>}</li> * <li>{@link org.eclipse.papyrus.uml.diagram.paletteconfiguration.impl.IconDescriptorImpl#getIconPath <em>Icon Path</em>}</li> * </ul> * </p> * * @generated */ public class IconDescriptorImpl extends EObjectImpl implements IconDescriptor { /** * The default value of the '{@link #getPluginID() <em>Plugin ID</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPluginID() * @generated * @ordered */ protected static final String PLUGIN_ID_EDEFAULT = null; /** * The cached value of the '{@link #getPluginID() <em>Plugin ID</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPluginID() * @generated * @ordered */ protected String pluginID = PLUGIN_ID_EDEFAULT; /** * 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; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IconDescriptorImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return PaletteconfigurationPackage.Literals.ICON_DESCRIPTOR; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getPluginID() { return pluginID; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setPluginID(String newPluginID) { String oldPluginID = pluginID; pluginID = newPluginID; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID, oldPluginID, pluginID)); } /** * <!-- 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, PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH, oldIconPath, iconPath)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: return getPluginID(); case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: return getIconPath(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: setPluginID((String)newValue); return; case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: setIconPath((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: setPluginID(PLUGIN_ID_EDEFAULT); return; case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: setIconPath(ICON_PATH_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PaletteconfigurationPackage.ICON_DESCRIPTOR__PLUGIN_ID: return PLUGIN_ID_EDEFAULT == null ? pluginID != null : !PLUGIN_ID_EDEFAULT.equals(pluginID); case PaletteconfigurationPackage.ICON_DESCRIPTOR__ICON_PATH: return ICON_PATH_EDEFAULT == null ? iconPath != null : !ICON_PATH_EDEFAULT.equals(iconPath); } 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(" (pluginID: "); result.append(pluginID); result.append(", iconPath: "); result.append(iconPath); result.append(')'); return result.toString(); } } //IconDescriptorImpl