/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.amalgam.tutorials.emf.droid.impl; import org.eclipse.amalgam.tutorials.emf.droid.DroidPackage; import org.eclipse.amalgam.tutorials.emf.droid.GoToURLAction; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Go To URL Action</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.amalgam.tutorials.emf.droid.impl.GoToURLActionImpl#getUrl <em>Url</em>}</li> * </ul> * </p> * * @generated */ public class GoToURLActionImpl extends ActionImpl implements GoToURLAction { /** * The default value of the '{@link #getUrl() <em>Url</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUrl() * @generated * @ordered */ protected static final String URL_EDEFAULT = null; /** * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUrl() * @generated * @ordered */ protected String url = URL_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected GoToURLActionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DroidPackage.eINSTANCE.getGoToURLAction(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getUrl() { return url; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUrl(String newUrl) { String oldUrl = url; url = newUrl; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroidPackage.GO_TO_URL_ACTION__URL, oldUrl, url)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DroidPackage.GO_TO_URL_ACTION__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 DroidPackage.GO_TO_URL_ACTION__URL: setUrl((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DroidPackage.GO_TO_URL_ACTION__URL: setUrl(URL_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DroidPackage.GO_TO_URL_ACTION__URL: return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); } 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(" (url: "); result.append(url); result.append(')'); return result.toString(); } } //GoToURLActionImpl