Skip to content

Commit

Permalink
#176 IdentifiableElement now extends emde.ExtensibleElement
Browse files Browse the repository at this point in the history
IdentifiableElement used to extends emde.Element,
now it extends emde.ExtensibleElement, in order to provide ownedExtensions

Regenerated M2

Change-Id: I8b4fb00262c94ea1b98395026eb29a18c1151282
Signed-off-by: Erwann Traisnel <erwann.traisnel@obeo.fr>
  • Loading branch information
etraisnel2 authored and pdulth committed Mar 1, 2023
1 parent 9836aa2 commit 77ba510
Show file tree
Hide file tree
Showing 25 changed files with 459 additions and 987 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.polarsys.capella.vp.requirements.CapellaRequirements.CapellaModule;
Expand All @@ -37,12 +39,6 @@
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Capella Module</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.polarsys.capella.vp.requirements.CapellaRequirements.impl.CapellaModuleImpl#getOwnedExtensions <em>Owned Extensions</em>}</li>
* </ul>
*
* @generated
*/
Expand All @@ -69,140 +65,4 @@ protected EClass eStaticClass() {
return CapellaRequirementsPackage.Literals.CAPELLA_MODULE;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/

@SuppressWarnings("unchecked")
@Override
public EList<ElementExtension> getOwnedExtensions() {

return (EList<ElementExtension>) eDynamicGet(CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS,
EmdePackage.Literals.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS, true, true);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
return ((InternalEList<?>) getOwnedExtensions()).basicRemove(otherEnd, 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 CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
return getOwnedExtensions();
}
return super.eGet(featureID, resolve, coreType);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
getOwnedExtensions().clear();
getOwnedExtensions().addAll((Collection<? extends ElementExtension>) newValue);
return;
}
super.eSet(featureID, newValue);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
getOwnedExtensions().clear();
return;
}
super.eUnset(featureID);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
return !getOwnedExtensions().isEmpty();
}
return super.eIsSet(featureID);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == ExtensibleElement.class) {
switch (derivedFeatureID) {
case CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS:
return EmdePackage.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS;
default:
return -1;
}
}
if (baseClass == ElementExtension.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == ExtensibleElement.class) {
switch (baseFeatureID) {
case EmdePackage.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS:
return CapellaRequirementsPackage.CAPELLA_MODULE__OWNED_EXTENSIONS;
default:
return -1;
}
}
if (baseClass == ElementExtension.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}

} //CapellaModuleImpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
package org.polarsys.capella.vp.requirements.CapellaRequirements.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.polarsys.capella.core.data.capellacore.CapellaElement;
Expand All @@ -42,7 +48,6 @@
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.polarsys.capella.vp.requirements.CapellaRequirements.impl.CapellaOutgoingRelationImpl#getOwnedExtensions <em>Owned Extensions</em>}</li>
* <li>{@link org.polarsys.capella.vp.requirements.CapellaRequirements.impl.CapellaOutgoingRelationImpl#getSource <em>Source</em>}</li>
* <li>{@link org.polarsys.capella.vp.requirements.CapellaRequirements.impl.CapellaOutgoingRelationImpl#getTarget <em>Target</em>}</li>
* </ul>
Expand Down Expand Up @@ -72,21 +77,6 @@ protected EClass eStaticClass() {
return CapellaRequirementsPackage.Literals.CAPELLA_OUTGOING_RELATION;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/

@SuppressWarnings("unchecked")
@Override
public EList<ElementExtension> getOwnedExtensions() {

return (EList<ElementExtension>) eDynamicGet(
CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS,
EmdePackage.Literals.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS, true, true);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down Expand Up @@ -165,20 +155,6 @@ public void setTarget(Requirement newTarget) {

}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
return ((InternalEList<?>) getOwnedExtensions()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand All @@ -187,8 +163,6 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
return getOwnedExtensions();
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__SOURCE:
if (resolve)
return getSource();
Expand All @@ -210,10 +184,6 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
getOwnedExtensions().clear();
getOwnedExtensions().addAll((Collection<? extends ElementExtension>) newValue);
return;
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__SOURCE:
setSource((CapellaElement) newValue);
return;
Expand All @@ -232,9 +202,6 @@ public void eSet(int featureID, Object newValue) {
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
getOwnedExtensions().clear();
return;
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__SOURCE:
setSource((CapellaElement) null);
return;
Expand All @@ -253,8 +220,6 @@ public void eUnset(int featureID) {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
return !getOwnedExtensions().isEmpty();
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__SOURCE:
return basicGetSource() != null;
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__TARGET:
Expand All @@ -263,52 +228,4 @@ public boolean eIsSet(int featureID) {
return super.eIsSet(featureID);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == ExtensibleElement.class) {
switch (derivedFeatureID) {
case CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS:
return EmdePackage.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS;
default:
return -1;
}
}
if (baseClass == ElementExtension.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == ExtensibleElement.class) {
switch (baseFeatureID) {
case EmdePackage.EXTENSIBLE_ELEMENT__OWNED_EXTENSIONS:
return CapellaRequirementsPackage.CAPELLA_OUTGOING_RELATION__OWNED_EXTENSIONS;
default:
return -1;
}
}
if (baseClass == ElementExtension.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}

} //CapellaOutgoingRelationImpl

0 comments on commit 77ba510

Please sign in to comment.