Commit 936feb0c authored by Dominique Marcadet's avatar Dominique Marcadet

remove use of FeatureMap in ConnectedAP

parent 1ca112a2
Pipeline #4639 passed with stages
in 32 seconds
......@@ -174,7 +174,6 @@ public class ConnectedAPItemProvider extends UnNamingItemProvider {
childrenFeatures.add( SclPackage.eINSTANCE.getConnectedAP_PhysConn() );
childrenFeatures.add( SclPackage.eINSTANCE.getConnectedAP_GSE() );
childrenFeatures.add( SclPackage.eINSTANCE.getConnectedAP_SMV() );
childrenFeatures.add( SclPackage.eINSTANCE.getConnectedAP_ControlBlock() );
}
return childrenFeatures;
}
......@@ -237,7 +236,6 @@ public class ConnectedAPItemProvider extends UnNamingItemProvider {
case SclPackage.CONNECTED_AP__PHYS_CONN:
case SclPackage.CONNECTED_AP__GSE:
case SclPackage.CONNECTED_AP__SMV:
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
fireNotifyChanged( new ViewerNotification( notification, notification.getNotifier(), true, false ) );
return;
}
......
......@@ -258,26 +258,11 @@
upperBound="-1" eType="#//PhysConn" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//PhysConn/ParentConnectedAP"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="GSE" ordered="false" upperBound="-1"
eType="#//GSE" volatile="true" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//GSE/ParentConnectedAP">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlBlock"/>
</eAnnotations>
</eStructuralFeatures>
eType="#//GSE" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//GSE/ParentConnectedAP"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SMV" ordered="false" upperBound="-1"
eType="#//SMV" volatile="true" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SMV/ParentConnectedAP">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlBlock"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlBlock" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
</eAnnotations>
</eStructuralFeatures>
eType="#//SMV" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SMV/ParentConnectedAP"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ControlBlock" abstract="true" eSuperTypes="#//UnNaming">
<eOperations name="getParentConnectedAP" eType="#//ConnectedAP"/>
......
......@@ -214,7 +214,6 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//ConnectedAP/PhysConn"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//ConnectedAP/GSE"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//ConnectedAP/SMV"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute SCL.ecore#//ConnectedAP/ControlBlock"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//ControlBlock">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//ControlBlock/cbName"/>
......
......@@ -21,7 +21,6 @@
package fr.centralesupelec.edf.riseclipse.iec61850.scl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.FeatureMap;
/**
* <!-- begin-user-doc -->
......@@ -41,7 +40,6 @@ import org.eclipse.emf.ecore.util.FeatureMap;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getPhysConn <em>Phys Conn</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getGSE <em>GSE</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getSMV <em>SMV</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getControlBlock <em>Control Block</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getConnectedAP()
......@@ -398,8 +396,7 @@ public interface ConnectedAP extends UnNaming {
* @see #unsetGSE()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getConnectedAP_GSE()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.GSE#getParentConnectedAP
* @model opposite="ParentConnectedAP" containment="true" unsettable="true" volatile="true" ordered="false"
* extendedMetaData="group='#ControlBlock'"
* @model opposite="ParentConnectedAP" containment="true" unsettable="true" ordered="false"
* @generated
*/
EList< GSE > getGSE();
......@@ -440,8 +437,7 @@ public interface ConnectedAP extends UnNaming {
* @see #unsetSMV()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getConnectedAP_SMV()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SMV#getParentConnectedAP
* @model opposite="ParentConnectedAP" containment="true" unsettable="true" volatile="true" ordered="false"
* extendedMetaData="group='#ControlBlock'"
* @model opposite="ParentConnectedAP" containment="true" unsettable="true" ordered="false"
* @generated
*/
EList< SMV > getSMV();
......@@ -467,17 +463,4 @@ public interface ConnectedAP extends UnNaming {
*/
boolean isSetSMV();
/**
* Returns the value of the '<em><b>Control Block</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Control Block</em>' attribute list.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getConnectedAP_ControlBlock()
* @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" ordered="false"
* extendedMetaData="kind='group'"
* @generated
*/
FeatureMap getControlBlock();
} // ConnectedAP
......@@ -3702,15 +3702,6 @@ public interface SclPackage extends EPackage {
*/
int CONNECTED_AP__SMV = UN_NAMING_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Control Block</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CONNECTED_AP__CONTROL_BLOCK = UN_NAMING_FEATURE_COUNT + 9;
/**
* The number of structural features of the '<em>Connected AP</em>' class.
* <!-- begin-user-doc -->
......@@ -3718,7 +3709,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int CONNECTED_AP_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 10;
int CONNECTED_AP_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 9;
/**
* The operation id for the '<em>Build Explicit Links</em>' operation.
......@@ -22767,17 +22758,6 @@ public interface SclPackage extends EPackage {
*/
EReference getConnectedAP_SMV();
/**
* Returns the meta object for the attribute list '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getControlBlock <em>Control Block</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Control Block</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.ConnectedAP#getControlBlock()
* @see #getConnectedAP()
* @generated
*/
EAttribute getConnectedAP_ControlBlock();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ControlBlock <em>Control Block</em>}'.
* <!-- begin-user-doc -->
......@@ -40,10 +40,8 @@ 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.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
/**
......@@ -63,7 +61,6 @@ import org.eclipse.emf.ecore.util.InternalEList;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.ConnectedAPImpl#getPhysConn <em>Phys Conn</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.ConnectedAPImpl#getGSE <em>GSE</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.ConnectedAPImpl#getSMV <em>SMV</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.ConnectedAPImpl#getControlBlock <em>Control Block</em>}</li>
* </ul>
*
* @generated
......@@ -205,14 +202,24 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
protected EList< PhysConn > physConn;
/**
* The cached value of the '{@link #getControlBlock() <em>Control Block</em>}' attribute list.
* The cached value of the '{@link #getGSE() <em>GSE</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControlBlock()
* @see #getGSE()
* @generated
* @ordered
*/
protected FeatureMap controlBlock;
protected EList< GSE > gse;
/**
* The cached value of the '{@link #getSMV() <em>SMV</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSMV()
* @generated
* @ordered
*/
protected EList< SMV > smv;
/**
* <!-- begin-user-doc -->
......@@ -704,7 +711,11 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public EList< GSE > getGSE() {
return getControlBlock().list( SclPackage.eINSTANCE.getConnectedAP_GSE() );
if( gse == null ) {
gse = new EObjectContainmentWithInverseEList.Unsettable< GSE >( GSE.class, this,
SclPackage.CONNECTED_AP__GSE, SclPackage.GSE__PARENT_CONNECTED_AP );
}
return gse;
}
/**
......@@ -714,7 +725,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public void unsetGSE() {
( ( FeatureMap.Internal ) getControlBlock() ).clear( SclPackage.eINSTANCE.getConnectedAP_GSE() );
if( gse != null ) ( ( InternalEList.Unsettable< ? > ) gse ).unset();
}
/**
......@@ -724,7 +735,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public boolean isSetGSE() {
return !( ( FeatureMap.Internal ) getControlBlock() ).isEmpty( SclPackage.eINSTANCE.getConnectedAP_GSE() );
return gse != null && ( ( InternalEList.Unsettable< ? > ) gse ).isSet();
}
/**
......@@ -734,7 +745,11 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public EList< SMV > getSMV() {
return getControlBlock().list( SclPackage.eINSTANCE.getConnectedAP_SMV() );
if( smv == null ) {
smv = new EObjectContainmentWithInverseEList.Unsettable< SMV >( SMV.class, this,
SclPackage.CONNECTED_AP__SMV, SclPackage.SMV__PARENT_CONNECTED_AP );
}
return smv;
}
/**
......@@ -744,7 +759,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public void unsetSMV() {
( ( FeatureMap.Internal ) getControlBlock() ).clear( SclPackage.eINSTANCE.getConnectedAP_SMV() );
if( smv != null ) ( ( InternalEList.Unsettable< ? > ) smv ).unset();
}
/**
......@@ -754,20 +769,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
*/
@Override
public boolean isSetSMV() {
return !( ( FeatureMap.Internal ) getControlBlock() ).isEmpty( SclPackage.eINSTANCE.getConnectedAP_SMV() );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FeatureMap getControlBlock() {
if( controlBlock == null ) {
controlBlock = new BasicFeatureMap( this, SclPackage.CONNECTED_AP__CONTROL_BLOCK );
}
return controlBlock;
return smv != null && ( ( InternalEList.Unsettable< ? > ) smv ).isSet();
}
/**
......@@ -824,8 +826,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
return ( ( InternalEList< ? > ) getGSE() ).basicRemove( otherEnd, msgs );
case SclPackage.CONNECTED_AP__SMV:
return ( ( InternalEList< ? > ) getSMV() ).basicRemove( otherEnd, msgs );
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
return ( ( InternalEList< ? > ) getControlBlock() ).basicRemove( otherEnd, msgs );
}
return super.eInverseRemove( otherEnd, featureID, msgs );
}
......@@ -871,9 +871,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
return getGSE();
case SclPackage.CONNECTED_AP__SMV:
return getSMV();
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
if( coreType ) return getControlBlock();
return ( ( FeatureMap.Internal ) getControlBlock() ).getWrapper();
}
return super.eGet( featureID, resolve, coreType );
}
......@@ -917,9 +914,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
getSMV().clear();
getSMV().addAll( ( Collection< ? extends SMV > ) newValue );
return;
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
( ( FeatureMap.Internal ) getControlBlock() ).set( newValue );
return;
}
super.eSet( featureID, newValue );
}
......@@ -959,9 +953,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
case SclPackage.CONNECTED_AP__SMV:
unsetSMV();
return;
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
getControlBlock().clear();
return;
}
super.eUnset( featureID );
}
......@@ -992,8 +983,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
return isSetGSE();
case SclPackage.CONNECTED_AP__SMV:
return isSetSMV();
case SclPackage.CONNECTED_AP__CONTROL_BLOCK:
return controlBlock != null && !controlBlock.isEmpty();
}
return super.eIsSet( featureID );
}
......@@ -1023,8 +1012,6 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
result.append( redProt );
else
result.append( "<unset>" );
result.append( ", ControlBlock: " );
result.append( controlBlock );
result.append( ')' );
return result.toString();
}
......
......@@ -2334,16 +2334,6 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return ( EReference ) getConnectedAP().getEStructuralFeatures().get( 8 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getConnectedAP_ControlBlock() {
return ( EAttribute ) getConnectedAP().getEStructuralFeatures().get( 9 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -258,26 +258,11 @@
upperBound="-1" eType="#//PhysConn" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//PhysConn/ParentConnectedAP"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="GSE" ordered="false" upperBound="-1"
eType="#//GSE" volatile="true" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//GSE/ParentConnectedAP">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlBlock"/>
</eAnnotations>
</eStructuralFeatures>
eType="#//GSE" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//GSE/ParentConnectedAP"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="SMV" ordered="false" upperBound="-1"
eType="#//SMV" volatile="true" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SMV/ParentConnectedAP">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="group" value="#ControlBlock"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlBlock" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
</eAnnotations>
</eStructuralFeatures>
eType="#//SMV" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//SMV/ParentConnectedAP"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ControlBlock" abstract="true" eSuperTypes="#//UnNaming">
<eOperations name="getParentConnectedAP" eType="#//ConnectedAP"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment