diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java | 148 |
1 files changed, 90 insertions, 58 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java index d1daa780686..e0cc2335785 100644 --- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/userattributes/impl/UserAttributeableElementImpl.java @@ -1,7 +1,7 @@ /***************************************************************************** * Copyright (c) 2010 CEA LIST. * - * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -38,10 +38,10 @@ import org.eclipse.uml2.uml.NamedElement; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getUaValue <em>Ua Value</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getUaType <em>Ua Type</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getAttributedElement <em>Attributed Element</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getBase_NamedElement <em>Base Named Element</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getUaValue <em>Ua Value</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getUaType <em>Ua Type</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getAttributedElement <em>Attributed Element</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.userattributes.impl.UserAttributeableElementImpl#getBase_NamedElement <em>Base Named Element</em>}</li> * </ul> * </p> * @@ -52,6 +52,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i * The cached value of the '{@link #getUaValue() <em>Ua Value</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getUaValue() * @generated * @ordered @@ -62,6 +63,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i * The cached value of the '{@link #getUaType() <em>Ua Type</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getUaType() * @generated * @ordered @@ -72,6 +74,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i * The cached value of the '{@link #getAttributedElement() <em>Attributed Element</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getAttributedElement() * @generated * @ordered @@ -82,6 +85,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i * The cached value of the '{@link #getBase_NamedElement() <em>Base Named Element</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getBase_NamedElement() * @generated * @ordered @@ -91,6 +95,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ protected UserAttributeableElementImpl() { @@ -100,21 +105,26 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: - return getUaValue(); - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: - return getUaType(); - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: - if (resolve) return getAttributedElement(); - return basicGetAttributedElement(); - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: - if (resolve) return getBase_NamedElement(); - return basicGetBase_NamedElement(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: + return getUaValue(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: + return getUaType(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: + if (resolve) { + return getAttributedElement(); + } + return basicGetAttributedElement(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: + if (resolve) { + return getBase_NamedElement(); + } + return basicGetBase_NamedElement(); } return super.eGet(featureID, resolve, coreType); } @@ -122,19 +132,20 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: - return uaValue != null && !uaValue.isEmpty(); - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: - return uaType != null && !uaType.isEmpty(); - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: - return attributedElement != null; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: - return base_NamedElement != null; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: + return uaValue != null && !uaValue.isEmpty(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: + return uaType != null && !uaType.isEmpty(); + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: + return attributedElement != null; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: + return base_NamedElement != null; } return super.eIsSet(featureID); } @@ -142,26 +153,27 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: - getUaValue().clear(); - getUaValue().addAll((Collection<? extends UserAttributeValue>)newValue); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: - getUaType().clear(); - getUaType().addAll((Collection<? extends UserAttributeElementType>)newValue); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: - setAttributedElement((NamedElement)newValue); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: - setBase_NamedElement((NamedElement)newValue); - return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: + getUaValue().clear(); + getUaValue().addAll((Collection<? extends UserAttributeValue>) newValue); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: + getUaType().clear(); + getUaType().addAll((Collection<? extends UserAttributeElementType>) newValue); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: + setAttributedElement((NamedElement) newValue); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: + setBase_NamedElement((NamedElement) newValue); + return; } super.eSet(featureID, newValue); } @@ -169,6 +181,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override @@ -179,23 +192,24 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: - getUaValue().clear(); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: - getUaType().clear(); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: - setAttributedElement((NamedElement)null); - return; - case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: - setBase_NamedElement((NamedElement)null); - return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE: + getUaValue().clear(); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE: + getUaType().clear(); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT: + setAttributedElement((NamedElement) null); + return; + case UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT: + setBase_NamedElement((NamedElement) null); + return; } super.eUnset(featureID); } @@ -203,8 +217,10 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public EList<UserAttributeElementType> getUaType() { if (uaType == null) { uaType = new EObjectResolvingEList<UserAttributeElementType>(UserAttributeElementType.class, this, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE); @@ -215,15 +231,18 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public NamedElement getAttributedElement() { if (attributedElement != null && attributedElement.eIsProxy()) { - InternalEObject oldAttributedElement = (InternalEObject)attributedElement; - attributedElement = (NamedElement)eResolveProxy(oldAttributedElement); + InternalEObject oldAttributedElement = (InternalEObject) attributedElement; + attributedElement = (NamedElement) eResolveProxy(oldAttributedElement); if (attributedElement != oldAttributedElement) { - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT, oldAttributedElement, attributedElement)); + } } } return attributedElement; @@ -232,6 +251,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public NamedElement basicGetAttributedElement() { @@ -241,27 +261,33 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setAttributedElement(NamedElement newAttributedElement) { NamedElement oldAttributedElement = attributedElement; attributedElement = newAttributedElement; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__ATTRIBUTED_ELEMENT, oldAttributedElement, attributedElement)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public NamedElement getBase_NamedElement() { if (base_NamedElement != null && base_NamedElement.eIsProxy()) { - InternalEObject oldBase_NamedElement = (InternalEObject)base_NamedElement; - base_NamedElement = (NamedElement)eResolveProxy(oldBase_NamedElement); + InternalEObject oldBase_NamedElement = (InternalEObject) base_NamedElement; + base_NamedElement = (NamedElement) eResolveProxy(oldBase_NamedElement); if (base_NamedElement != oldBase_NamedElement) { - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement)); + } } } return base_NamedElement; @@ -270,6 +296,7 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public NamedElement basicGetBase_NamedElement() { @@ -279,20 +306,25 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setBase_NamedElement(NamedElement newBase_NamedElement) { NamedElement oldBase_NamedElement = base_NamedElement; base_NamedElement = newBase_NamedElement; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public EList<UserAttributeValue> getUaValue() { if (uaValue == null) { uaValue = new EObjectResolvingEList<UserAttributeValue>(UserAttributeValue.class, this, UserattributesPackage.USER_ATTRIBUTEABLE_ELEMENT__UA_VALUE); @@ -300,4 +332,4 @@ public class UserAttributeableElementImpl extends MinimalEObjectImpl.Container i return uaValue; } -} //UserAttributeableElementImpl +} // UserAttributeableElementImpl |