diff options
Diffstat (limited to 'plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java')
-rw-r--r-- | plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java index a642bad5..e5de4eca 100644 --- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java +++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java @@ -2,12 +2,13 @@ * <copyright> * </copyright> * - * $Id: DeclaredParameterImpl.java,v 1.3 2008/03/07 11:10:58 jkohnlein Exp $ + * $Id: DeclaredParameterImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $ */ package org.eclipse.xpand3.staticTypesystem.impl; 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; @@ -32,7 +33,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage; */ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements DeclaredParameter { /** - * The cached value of the '{@link #getType() <em>Type</em>}' reference. + * The cached value of the '{@link #getType() <em>Type</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() @@ -66,14 +67,6 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D * @generated */ public AbstractTypeReference getType() { - if (type != null && type.eIsProxy()) { - InternalEObject oldType = (InternalEObject)type; - type = (AbstractTypeReference)eResolveProxy(oldType); - if (type != oldType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, type)); - } - } return type; } @@ -82,8 +75,14 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D * <!-- end-user-doc --> * @generated */ - public AbstractTypeReference basicGetType() { - return type; + public NotificationChain basicSetType(AbstractTypeReference newType, NotificationChain msgs) { + AbstractTypeReference oldType = type; + type = newType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, newType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; } /** @@ -92,10 +91,31 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D * @generated */ public void setType(AbstractTypeReference newType) { - AbstractTypeReference oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, type)); + if (newType != type) { + NotificationChain msgs = null; + if (type != null) + msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, null, msgs); + if (newType != null) + msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, null, msgs); + msgs = basicSetType(newType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, newType, newType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case StaticTypesystemPackage.DECLARED_PARAMETER__TYPE: + return basicSetType(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); } /** @@ -107,8 +127,7 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case StaticTypesystemPackage.DECLARED_PARAMETER__TYPE: - if (resolve) return getType(); - return basicGetType(); + return getType(); } return super.eGet(featureID, resolve, coreType); } |