/** * <copyright> * </copyright> * */ package org.applause.lang.applauseDsl.impl; import org.applause.lang.applauseDsl.ApplauseDslPackage; import org.applause.lang.applauseDsl.ExternalOpen; import org.applause.lang.applauseDsl.ScalarExpression; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; 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>External Open</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.applause.lang.applauseDsl.impl.ExternalOpenImpl#getUrl <em>Url</em>}</li> * </ul> * </p> * * @generated */ public class ExternalOpenImpl extends ViewActionImpl implements ExternalOpen { /** * The cached value of the '{@link #getUrl() <em>Url</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUrl() * @generated * @ordered */ protected ScalarExpression url; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ExternalOpenImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ApplauseDslPackage.Literals.EXTERNAL_OPEN; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ScalarExpression getUrl() { return url; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetUrl(ScalarExpression newUrl, NotificationChain msgs) { ScalarExpression oldUrl = url; url = newUrl; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.EXTERNAL_OPEN__URL, oldUrl, newUrl); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUrl(ScalarExpression newUrl) { if (newUrl != url) { NotificationChain msgs = null; if (url != null) msgs = ((InternalEObject)url).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplauseDslPackage.EXTERNAL_OPEN__URL, null, msgs); if (newUrl != null) msgs = ((InternalEObject)newUrl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplauseDslPackage.EXTERNAL_OPEN__URL, null, msgs); msgs = basicSetUrl(newUrl, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.EXTERNAL_OPEN__URL, newUrl, newUrl)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ApplauseDslPackage.EXTERNAL_OPEN__URL: return basicSetUrl(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplauseDslPackage.EXTERNAL_OPEN__URL: return getUrl(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplauseDslPackage.EXTERNAL_OPEN__URL: setUrl((ScalarExpression)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplauseDslPackage.EXTERNAL_OPEN__URL: setUrl((ScalarExpression)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplauseDslPackage.EXTERNAL_OPEN__URL: return url != null; } return super.eIsSet(featureID); } } //ExternalOpenImpl