Commit 8017695c authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '63-logcontrol-in-ln0-are-displayed-twice' into 'master'

Resolve "LogControl in LN0 are displayed twice"

Closes #63

See merge request !60
parents 9c160ad9 69a7499a
Pipeline #4638 passed with stages
in 32 seconds
......@@ -289,7 +289,6 @@ public class AnyLNItemProvider extends UnNamingItemProvider {
childrenFeatures.add( SclPackage.eINSTANCE.getAnyLN_ReportControl() );
childrenFeatures.add( SclPackage.eINSTANCE.getAnyLN_LogControl() );
childrenFeatures.add( SclPackage.eINSTANCE.getAnyLN_DataSet() );
childrenFeatures.add( SclPackage.eINSTANCE.getAnyLN_Control() );
}
return childrenFeatures;
}
......@@ -353,7 +352,6 @@ public class AnyLNItemProvider extends UnNamingItemProvider {
case SclPackage.ANY_LN__REPORT_CONTROL:
case SclPackage.ANY_LN__LOG_CONTROL:
case SclPackage.ANY_LN__DATA_SET:
case SclPackage.ANY_LN__CONTROL:
fireNotifyChanged( new ViewerNotification( notification, notification.getNotifier(), true, false ) );
return;
}
......
......@@ -655,14 +655,6 @@
eOpposite="#//LNode/RefersToAnyLN"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithTriggerOpt"
ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
volatile="true" transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="group" value="#Control"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Control" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
......@@ -1224,10 +1216,9 @@
eOpposite="#//SettingControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithIEDName" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
volatile="true" transient="true" unsettable="true">
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="group" value="#Control"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
......
......@@ -375,7 +375,6 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//AnyLN/ReferredByIEDName"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//AnyLN/ReferredByLNode"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//AnyLN/ControlWithTriggerOpt"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute SCL.ecore#//AnyLN/Control"/>
<genOperations ecoreOperation="SCL.ecore#//AnyLN/getParentLDevice"/>
<genOperations ecoreOperation="SCL.ecore#//AnyLN/getNamespace"/>
</genClasses>
......
......@@ -48,7 +48,6 @@ import org.eclipse.emf.ecore.util.FeatureMap;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getReferredByIEDName <em>Referred By IED Name</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getReferredByLNode <em>Referred By LNode</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControlWithTriggerOpt <em>Control With Trigger Opt</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControl <em>Control</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getAnyLN()
......@@ -738,8 +737,8 @@ public interface AnyLN extends UnNaming {
* @see #isSetControlWithTriggerOpt()
* @see #unsetControlWithTriggerOpt()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getAnyLN_ControlWithTriggerOpt()
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" volatile="true" ordered="false"
* extendedMetaData="kind='group' group='#Control'"
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" ordered="false"
* extendedMetaData="kind='group'"
* @generated
*/
FeatureMap getControlWithTriggerOpt();
......@@ -765,42 +764,6 @@ public interface AnyLN extends UnNaming {
*/
boolean isSetControlWithTriggerOpt();
/**
* Returns the value of the '<em><b>Control</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</em>' attribute list.
* @see #isSetControl()
* @see #unsetControl()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getAnyLN_Control()
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" ordered="false"
* extendedMetaData="kind='group'"
* @generated
*/
FeatureMap getControl();
/**
* Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControl <em>Control</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetControl()
* @see #getControl()
* @generated
*/
void unsetControl();
/**
* Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControl <em>Control</em>}' attribute list is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Control</em>' attribute list is set.
* @see #unsetControl()
* @see #getControl()
* @generated
*/
boolean isSetControl();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -217,8 +217,8 @@ public interface LN0 extends AnyLN {
* @see #isSetControlWithIEDName()
* @see #unsetControlWithIEDName()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLN0_ControlWithIEDName()
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" volatile="true" ordered="false"
* extendedMetaData="kind='group' group='#Control'"
* @model unsettable="true" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" transient="true" ordered="false"
* extendedMetaData="kind='group'"
* @generated
*/
FeatureMap getControlWithIEDName();
......
......@@ -7206,15 +7206,6 @@ public interface SclPackage extends EPackage {
*/
int ANY_LN__CONTROL_WITH_TRIGGER_OPT = UN_NAMING_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Control</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANY_LN__CONTROL = UN_NAMING_FEATURE_COUNT + 16;
/**
* The number of structural features of the '<em>Any LN</em>' class.
* <!-- begin-user-doc -->
......@@ -7222,7 +7213,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int ANY_LN_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 17;
int ANY_LN_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 16;
/**
* The operation id for the '<em>Build Explicit Links</em>' operation.
......@@ -12721,15 +12712,6 @@ public interface SclPackage extends EPackage {
*/
int LN__CONTROL_WITH_TRIGGER_OPT = ANY_LN__CONTROL_WITH_TRIGGER_OPT;
/**
* The feature id for the '<em><b>Control</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LN__CONTROL = ANY_LN__CONTROL;
/**
* The feature id for the '<em><b>Prefix</b></em>' attribute.
* <!-- begin-user-doc -->
......@@ -13009,15 +12991,6 @@ public interface SclPackage extends EPackage {
*/
int LN0__CONTROL_WITH_TRIGGER_OPT = ANY_LN__CONTROL_WITH_TRIGGER_OPT;
/**
* The feature id for the '<em><b>Control</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LN0__CONTROL = ANY_LN__CONTROL;
/**
* The feature id for the '<em><b>GSE Control</b></em>' containment reference list.
* <!-- begin-user-doc -->
......@@ -25052,17 +25025,6 @@ public interface SclPackage extends EPackage {
*/
EAttribute getAnyLN_ControlWithTriggerOpt();
/**
* Returns the meta object for the attribute list '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControl <em>Control</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Control</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getControl()
* @see #getAnyLN()
* @generated
*/
EAttribute getAnyLN_Control();
/**
* Returns the meta object for the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN#getParentLDevice() <em>Get Parent LDevice</em>}' operation.
* <!-- begin-user-doc -->
......@@ -83,7 +83,6 @@ import org.eclipse.emf.ecore.util.InternalEList;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.AnyLNImpl#getReferredByIEDName <em>Referred By IED Name</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.AnyLNImpl#getReferredByLNode <em>Referred By LNode</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.AnyLNImpl#getControlWithTriggerOpt <em>Control With Trigger Opt</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.AnyLNImpl#getControl <em>Control</em>}</li>
* </ul>
*
* @generated
......@@ -295,14 +294,14 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
protected EList< LNode > referredByLNode;
/**
* The cached value of the '{@link #getControl() <em>Control</em>}' attribute list.
* The cached value of the '{@link #getControlWithTriggerOpt() <em>Control With Trigger Opt</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControl()
* @see #getControlWithTriggerOpt()
* @generated
* @ordered
*/
protected FeatureMap control;
protected FeatureMap controlWithTriggerOpt;
/**
* <!-- begin-user-doc -->
......@@ -1045,8 +1044,10 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
*/
@Override
public FeatureMap getControlWithTriggerOpt() {
return ( FeatureMap ) getControl().< FeatureMap.Entry > list(
SclPackage.eINSTANCE.getAnyLN_ControlWithTriggerOpt() );
if( controlWithTriggerOpt == null ) {
controlWithTriggerOpt = new BasicFeatureMap( this, SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT );
}
return controlWithTriggerOpt;
}
/**
......@@ -1056,7 +1057,7 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
*/
@Override
public void unsetControlWithTriggerOpt() {
( ( FeatureMap.Internal ) getControl() ).clear( SclPackage.eINSTANCE.getAnyLN_ControlWithTriggerOpt() );
if( controlWithTriggerOpt != null ) ( ( InternalEList.Unsettable< ? > ) controlWithTriggerOpt ).unset();
}
/**
......@@ -1066,41 +1067,7 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
*/
@Override
public boolean isSetControlWithTriggerOpt() {
return !( ( FeatureMap.Internal ) getControl() )
.isEmpty( SclPackage.eINSTANCE.getAnyLN_ControlWithTriggerOpt() );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public FeatureMap getControl() {
if( control == null ) {
control = new BasicFeatureMap( this, SclPackage.ANY_LN__CONTROL );
}
return control;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void unsetControl() {
if( control != null ) ( ( InternalEList.Unsettable< ? > ) control ).unset();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isSetControl() {
return control != null && ( ( InternalEList.Unsettable< ? > ) control ).isSet();
return controlWithTriggerOpt != null && ( ( InternalEList.Unsettable< ? > ) controlWithTriggerOpt ).isSet();
}
/**
......@@ -1285,8 +1252,6 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
return ( ( InternalEList< ? > ) getReferredByLNode() ).basicRemove( otherEnd, msgs );
case SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT:
return ( ( InternalEList< ? > ) getControlWithTriggerOpt() ).basicRemove( otherEnd, msgs );
case SclPackage.ANY_LN__CONTROL:
return ( ( InternalEList< ? > ) getControl() ).basicRemove( otherEnd, msgs );
}
return super.eInverseRemove( otherEnd, featureID, msgs );
}
......@@ -1332,9 +1297,6 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
case SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT:
if( coreType ) return getControlWithTriggerOpt();
return ( ( FeatureMap.Internal ) getControlWithTriggerOpt() ).getWrapper();
case SclPackage.ANY_LN__CONTROL:
if( coreType ) return getControl();
return ( ( FeatureMap.Internal ) getControl() ).getWrapper();
}
return super.eGet( featureID, resolve, coreType );
}
......@@ -1406,9 +1368,6 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
case SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT:
( ( FeatureMap.Internal ) getControlWithTriggerOpt() ).set( newValue );
return;
case SclPackage.ANY_LN__CONTROL:
( ( FeatureMap.Internal ) getControl() ).set( newValue );
return;
}
super.eSet( featureID, newValue );
}
......@@ -1469,9 +1428,6 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
case SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT:
unsetControlWithTriggerOpt();
return;
case SclPackage.ANY_LN__CONTROL:
unsetControl();
return;
}
super.eUnset( featureID );
}
......@@ -1516,8 +1472,6 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
return isSetReferredByLNode();
case SclPackage.ANY_LN__CONTROL_WITH_TRIGGER_OPT:
return isSetControlWithTriggerOpt();
case SclPackage.ANY_LN__CONTROL:
return isSetControl();
}
return super.eIsSet( featureID );
}
......@@ -1563,8 +1517,8 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
result.append( lnType );
else
result.append( "<unset>" );
result.append( ", Control: " );
result.append( control );
result.append( ", ControlWithTriggerOpt: " );
result.append( controlWithTriggerOpt );
result.append( ')' );
return result.toString();
}
......
......@@ -27,6 +27,7 @@ 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.EcoreUtil;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
......@@ -75,6 +76,16 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
protected boolean settingControlESet;
/**
* The cached value of the '{@link #getControlWithIEDName() <em>Control With IED Name</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControlWithIEDName()
* @generated
* @ordered
*/
protected FeatureMap controlWithIEDName;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -320,8 +331,10 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public FeatureMap getControlWithIEDName() {
return ( FeatureMap ) getControl().< FeatureMap.Entry > list(
SclPackage.eINSTANCE.getLN0_ControlWithIEDName() );
if( controlWithIEDName == null ) {
controlWithIEDName = new BasicFeatureMap( this, SclPackage.LN0__CONTROL_WITH_IED_NAME );
}
return controlWithIEDName;
}
/**
......@@ -331,7 +344,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public void unsetControlWithIEDName() {
( ( FeatureMap.Internal ) getControl() ).clear( SclPackage.eINSTANCE.getLN0_ControlWithIEDName() );
if( controlWithIEDName != null ) ( ( InternalEList.Unsettable< ? > ) controlWithIEDName ).unset();
}
/**
......@@ -341,7 +354,7 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
*/
@Override
public boolean isSetControlWithIEDName() {
return !( ( FeatureMap.Internal ) getControl() ).isEmpty( SclPackage.eINSTANCE.getLN0_ControlWithIEDName() );
return controlWithIEDName != null && ( ( InternalEList.Unsettable< ? > ) controlWithIEDName ).isSet();
}
/**
......@@ -510,4 +523,20 @@ public class LN0Impl extends AnyLNImpl implements LN0 {
return super.eIsSet( featureID );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if( eIsProxy() ) return super.toString();
StringBuilder result = new StringBuilder( super.toString() );
result.append( " (ControlWithIEDName: " );
result.append( controlWithIEDName );
result.append( ')' );
return result.toString();
}
} //LN0Impl
......@@ -4552,16 +4552,6 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return ( EAttribute ) getAnyLN().getEStructuralFeatures().get( 15 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EAttribute getAnyLN_Control() {
return ( EAttribute ) getAnyLN().getEStructuralFeatures().get( 16 );
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -655,14 +655,6 @@
eOpposite="#//LNode/RefersToAnyLN"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithTriggerOpt"
ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
volatile="true" transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="group" value="#Control"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Control" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
......@@ -1224,10 +1216,9 @@
eOpposite="#//SettingControl/ParentLN0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ControlWithIEDName" ordered="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
volatile="true" transient="true" unsettable="true">
transient="true" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="group"/>
<details key="group" value="#Control"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
......
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