/** */ package at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl; import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.ComponentDefinition; import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.FXGraphPackage; import at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.IncludeValueProperty; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Include Value Property</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.IncludeValuePropertyImpl#getSource <em>Source</em>}</li> * <li>{@link at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.impl.IncludeValuePropertyImpl#getName <em>Name</em>}</li> * </ul> * </p> * * @generated */ public class IncludeValuePropertyImpl extends SingleValuePropertyImpl implements IncludeValueProperty { /** * The cached value of the '{@link #getSource() <em>Source</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSource() * @generated * @ordered */ protected ComponentDefinition source; /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IncludeValuePropertyImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return FXGraphPackage.Literals.INCLUDE_VALUE_PROPERTY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComponentDefinition getSource() { if (source != null && source.eIsProxy()) { InternalEObject oldSource = (InternalEObject)source; source = (ComponentDefinition)eResolveProxy(oldSource); if (source != oldSource) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE, oldSource, source)); } } return source; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComponentDefinition basicGetSource() { return source; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setSource(ComponentDefinition newSource) { ComponentDefinition oldSource = source; source = newSource; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE, oldSource, source)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, FXGraphPackage.INCLUDE_VALUE_PROPERTY__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE: if (resolve) return getSource(); return basicGetSource(); case FXGraphPackage.INCLUDE_VALUE_PROPERTY__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE: setSource((ComponentDefinition)newValue); return; case FXGraphPackage.INCLUDE_VALUE_PROPERTY__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE: setSource((ComponentDefinition)null); return; case FXGraphPackage.INCLUDE_VALUE_PROPERTY__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case FXGraphPackage.INCLUDE_VALUE_PROPERTY__SOURCE: return source != null; case FXGraphPackage.INCLUDE_VALUE_PROPERTY__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } 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(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //IncludeValuePropertyImpl