/** * <copyright> * </copyright> * */ package org.applause.lang.applauseDsl.impl; import org.applause.lang.applauseDsl.ApplauseDslPackage; import org.applause.lang.applauseDsl.Parameter; import org.applause.lang.applauseDsl.View; 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>View</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.applause.lang.applauseDsl.impl.ViewImpl#getContent <em>Content</em>}</li> * </ul> * </p> * * @generated */ public class ViewImpl extends ModelElementImpl implements View { /** * The cached value of the '{@link #getContent() <em>Content</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContent() * @generated * @ordered */ protected Parameter content; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ViewImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ApplauseDslPackage.Literals.VIEW; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Parameter getContent() { return content; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetContent(Parameter newContent, NotificationChain msgs) { Parameter oldContent = content; content = newContent; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.VIEW__CONTENT, oldContent, newContent); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setContent(Parameter newContent) { if (newContent != content) { NotificationChain msgs = null; if (content != null) msgs = ((InternalEObject)content).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplauseDslPackage.VIEW__CONTENT, null, msgs); if (newContent != null) msgs = ((InternalEObject)newContent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplauseDslPackage.VIEW__CONTENT, null, msgs); msgs = basicSetContent(newContent, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.VIEW__CONTENT, newContent, newContent)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case ApplauseDslPackage.VIEW__CONTENT: return basicSetContent(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.VIEW__CONTENT: return getContent(); } 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.VIEW__CONTENT: setContent((Parameter)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplauseDslPackage.VIEW__CONTENT: setContent((Parameter)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplauseDslPackage.VIEW__CONTENT: return content != null; } return super.eIsSet(featureID); } } //ViewImpl