/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.papyrus.views.properties.ui.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.papyrus.views.properties.ui.UiPackage; import org.eclipse.papyrus.views.properties.ui.UnknownComponent; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Unknown Component</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.papyrus.views.properties.ui.impl.UnknownComponentImpl#getTypeName <em>Type Name</em>}</li> * </ul> * </p> * * @generated */ public class UnknownComponentImpl extends WidgetImpl implements UnknownComponent { /** * The default value of the '{@link #getTypeName() <em>Type Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getTypeName() * @generated * @ordered */ protected static final String TYPE_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getTypeName() <em>Type Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getTypeName() * @generated * @ordered */ protected String typeName = TYPE_NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected UnknownComponentImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return UiPackage.Literals.UNKNOWN_COMPONENT; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getTypeName() { return typeName; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTypeName(String newTypeName) { String oldTypeName = typeName; typeName = newTypeName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UiPackage.UNKNOWN_COMPONENT__TYPE_NAME, oldTypeName, typeName)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UiPackage.UNKNOWN_COMPONENT__TYPE_NAME: return getTypeName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case UiPackage.UNKNOWN_COMPONENT__TYPE_NAME: setTypeName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UiPackage.UNKNOWN_COMPONENT__TYPE_NAME: setTypeName(TYPE_NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UiPackage.UNKNOWN_COMPONENT__TYPE_NAME: return TYPE_NAME_EDEFAULT == null ? typeName != null : !TYPE_NAME_EDEFAULT.equals(typeName); } 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(" (typeName: "); result.append(typeName); result.append(')'); return result.toString(); } } //UnknownComponentImpl