Skip to content

Commit

Permalink
add some other forgotten default values of attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcadetd committed Jun 17, 2024
1 parent 1a745dc commit 6b381ad
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@
eType="#//McSecurity" unsettable="true" containment="true" resolveProxies="false"
eOpposite="#//McSecurity/ParentGSESettings"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="kdaParticipant" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
unsettable="true"/>
defaultValueLiteral="false" unsettable="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GSSE" eSuperTypes="#//ServiceWithMax">
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentServices" ordered="false"
Expand Down Expand Up @@ -1379,14 +1379,14 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="delivery" eType="#//SMVDeliveryEnum"
defaultValueLiteral="multicast" unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="deliveryConf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
unsettable="true"/>
defaultValueLiteral="false" unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentServices" ordered="false"
eType="#//Services" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//Services/SMVsc"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sv" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
unsettable="true"/>
defaultValueLiteral="true" unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="rSV" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
unsettable="true"/>
defaultValueLiteral="false" unsettable="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SampledValueControl" eSuperTypes="#//ControlWithIEDName">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="multicast" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand Down Expand Up @@ -236,6 +236,7 @@ public interface GSESettings extends ServiceSettings {

/**
* Returns the value of the '<em><b>Kda Participant</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Kda Participant</em>' attribute isn't clear,
Expand All @@ -247,7 +248,7 @@ public interface GSESettings extends ServiceSettings {
* @see #unsetKdaParticipant()
* @see #setKdaParticipant(Boolean)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getGSESettings_KdaParticipant()
* @model unsettable="true"
* @model default="false" unsettable="true"
* @generated
*/
Boolean getKdaParticipant();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand Down Expand Up @@ -100,6 +100,7 @@ public interface SMVsc extends ServiceWithMax {

/**
* Returns the value of the '<em><b>Delivery Conf</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Delivery Conf</em>' attribute isn't clear,
Expand All @@ -111,7 +112,7 @@ public interface SMVsc extends ServiceWithMax {
* @see #unsetDeliveryConf()
* @see #setDeliveryConf(Boolean)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getSMVsc_DeliveryConf()
* @model unsettable="true"
* @model default="false" unsettable="true"
* @generated
*/
Boolean getDeliveryConf();
Expand Down Expand Up @@ -177,6 +178,7 @@ public interface SMVsc extends ServiceWithMax {

/**
* Returns the value of the '<em><b>Sv</b></em>' attribute.
* The default value is <code>"true"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Sv</em>' attribute isn't clear,
Expand All @@ -188,7 +190,7 @@ public interface SMVsc extends ServiceWithMax {
* @see #unsetSv()
* @see #setSv(Boolean)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getSMVsc_Sv()
* @model unsettable="true"
* @model default="true" unsettable="true"
* @generated
*/
Boolean getSv();
Expand Down Expand Up @@ -230,6 +232,7 @@ public interface SMVsc extends ServiceWithMax {

/**
* Returns the value of the '<em><b>RSV</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>RSV</em>' attribute isn't clear,
Expand All @@ -241,7 +244,7 @@ public interface SMVsc extends ServiceWithMax {
* @see #unsetRSV()
* @see #setRSV(Boolean)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getSMVsc_RSV()
* @model unsettable="true"
* @model default="false" unsettable="true"
* @generated
*/
Boolean getRSV();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
** are made available under the terms of the Eclipse Public License v2.0
** which accompanies this distribution, and is available at
** https://www.eclipse.org/legal/epl-v20.html
**
**
** This file is part of the RiseClipse tool
**
**
** Contributors:
** Computer Science Department, CentraleSupélec
** EDF R&D
Expand Down Expand Up @@ -136,7 +136,7 @@ public class GSESettingsImpl extends ServiceSettingsImpl implements GSESettings
* @generated
* @ordered
*/
protected static final Boolean KDA_PARTICIPANT_EDEFAULT = null;
protected static final Boolean KDA_PARTICIPANT_EDEFAULT = Boolean.FALSE;

/**
* The cached value of the '{@link #getKdaParticipant() <em>Kda Participant</em>}' attribute.
Expand Down Expand Up @@ -197,9 +197,10 @@ public void setAppID( ServiceSettingsEnum newAppID ) {
appID = newAppID == null ? APP_ID_EDEFAULT : newAppID;
boolean oldAppIDESet = appIDESet;
appIDESet = true;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.SET, SclPackage.GSE_SETTINGS__APP_ID, oldAppID, appID,
!oldAppIDESet ) );
}
}

/**
Expand All @@ -213,9 +214,10 @@ public void unsetAppID() {
boolean oldAppIDESet = appIDESet;
appID = APP_ID_EDEFAULT;
appIDESet = false;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.UNSET, SclPackage.GSE_SETTINGS__APP_ID, oldAppID,
APP_ID_EDEFAULT, oldAppIDESet ) );
}
}

/**
Expand Down Expand Up @@ -249,9 +251,10 @@ public void setDataLabel( ServiceSettingsEnum newDataLabel ) {
dataLabel = newDataLabel == null ? DATA_LABEL_EDEFAULT : newDataLabel;
boolean oldDataLabelESet = dataLabelESet;
dataLabelESet = true;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.SET, SclPackage.GSE_SETTINGS__DATA_LABEL, oldDataLabel,
dataLabel, !oldDataLabelESet ) );
}
}

/**
Expand All @@ -265,9 +268,10 @@ public void unsetDataLabel() {
boolean oldDataLabelESet = dataLabelESet;
dataLabel = DATA_LABEL_EDEFAULT;
dataLabelESet = false;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.UNSET, SclPackage.GSE_SETTINGS__DATA_LABEL, oldDataLabel,
DATA_LABEL_EDEFAULT, oldDataLabelESet ) );
}
}

/**
Expand All @@ -287,7 +291,9 @@ public boolean isSetDataLabel() {
*/
@Override
public Services getParentServices() {
if( eContainerFeatureID() != SclPackage.GSE_SETTINGS__PARENT_SERVICES ) return null;
if( eContainerFeatureID() != SclPackage.GSE_SETTINGS__PARENT_SERVICES ) {
return null;
}
return ( Services ) eInternalContainer();
}

Expand All @@ -312,20 +318,26 @@ public void setParentServices( Services newParentServices ) {
if( newParentServices != eInternalContainer()
|| ( eContainerFeatureID() != SclPackage.GSE_SETTINGS__PARENT_SERVICES
&& newParentServices != null ) ) {
if( EcoreUtil.isAncestor( this, newParentServices ) )
if( EcoreUtil.isAncestor( this, newParentServices ) ) {
throw new IllegalArgumentException( "Recursive containment not allowed for " + toString() );
}
NotificationChain msgs = null;
if( eInternalContainer() != null )
if( eInternalContainer() != null ) {
msgs = eBasicRemoveFromContainer( msgs );
if( newParentServices != null )
}
if( newParentServices != null ) {
msgs = ( ( InternalEObject ) newParentServices ).eInverseAdd( this, SclPackage.SERVICES__GSE_SETTINGS,
Services.class, msgs );
}
msgs = basicSetParentServices( newParentServices, msgs );
if( msgs != null ) msgs.dispatch();
if( msgs != null ) {
msgs.dispatch();
}
}
else if( eNotificationRequired() )
else if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.SET, SclPackage.GSE_SETTINGS__PARENT_SERVICES,
newParentServices, newParentServices ) );
}
}

/**
Expand All @@ -351,10 +363,12 @@ public NotificationChain basicSetMcSecurity( McSecurity newMcSecurity, Notificat
if( eNotificationRequired() ) {
ENotificationImpl notification = new ENotificationImpl( this, Notification.SET,
SclPackage.GSE_SETTINGS__MC_SECURITY, oldMcSecurity, newMcSecurity, !oldMcSecurityESet );
if( msgs == null )
if( msgs == null ) {
msgs = notification;
else
}
else {
msgs.add( notification );
}
}
return msgs;
}
Expand All @@ -368,21 +382,26 @@ public NotificationChain basicSetMcSecurity( McSecurity newMcSecurity, Notificat
public void setMcSecurity( McSecurity newMcSecurity ) {
if( newMcSecurity != mcSecurity ) {
NotificationChain msgs = null;
if( mcSecurity != null )
if( mcSecurity != null ) {
msgs = ( ( InternalEObject ) mcSecurity ).eInverseRemove( this,
SclPackage.MC_SECURITY__PARENT_GSE_SETTINGS, McSecurity.class, msgs );
if( newMcSecurity != null )
}
if( newMcSecurity != null ) {
msgs = ( ( InternalEObject ) newMcSecurity ).eInverseAdd( this,
SclPackage.MC_SECURITY__PARENT_GSE_SETTINGS, McSecurity.class, msgs );
}
msgs = basicSetMcSecurity( newMcSecurity, msgs );
if( msgs != null ) msgs.dispatch();
if( msgs != null ) {
msgs.dispatch();
}
}
else {
boolean oldMcSecurityESet = mcSecurityESet;
mcSecurityESet = true;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.SET, SclPackage.GSE_SETTINGS__MC_SECURITY,
newMcSecurity, newMcSecurity, !oldMcSecurityESet ) );
}
}
}

Expand All @@ -399,10 +418,12 @@ public NotificationChain basicUnsetMcSecurity( NotificationChain msgs ) {
if( eNotificationRequired() ) {
ENotificationImpl notification = new ENotificationImpl( this, Notification.UNSET,
SclPackage.GSE_SETTINGS__MC_SECURITY, oldMcSecurity, null, oldMcSecurityESet );
if( msgs == null )
if( msgs == null ) {
msgs = notification;
else
}
else {
msgs.add( notification );
}
}
return msgs;
}
Expand All @@ -419,14 +440,17 @@ public void unsetMcSecurity() {
msgs = ( ( InternalEObject ) mcSecurity ).eInverseRemove( this, SclPackage.MC_SECURITY__PARENT_GSE_SETTINGS,
McSecurity.class, msgs );
msgs = basicUnsetMcSecurity( msgs );
if( msgs != null ) msgs.dispatch();
if( msgs != null ) {
msgs.dispatch();
}
}
else {
boolean oldMcSecurityESet = mcSecurityESet;
mcSecurityESet = false;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.UNSET, SclPackage.GSE_SETTINGS__MC_SECURITY, null,
null, oldMcSecurityESet ) );
}
}
}

Expand Down Expand Up @@ -461,9 +485,10 @@ public void setKdaParticipant( Boolean newKdaParticipant ) {
kdaParticipant = newKdaParticipant;
boolean oldKdaParticipantESet = kdaParticipantESet;
kdaParticipantESet = true;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.SET, SclPackage.GSE_SETTINGS__KDA_PARTICIPANT,
oldKdaParticipant, kdaParticipant, !oldKdaParticipantESet ) );
}
}

/**
Expand All @@ -477,9 +502,10 @@ public void unsetKdaParticipant() {
boolean oldKdaParticipantESet = kdaParticipantESet;
kdaParticipant = KDA_PARTICIPANT_EDEFAULT;
kdaParticipantESet = false;
if( eNotificationRequired() )
if( eNotificationRequired() ) {
eNotify( new ENotificationImpl( this, Notification.UNSET, SclPackage.GSE_SETTINGS__KDA_PARTICIPANT,
oldKdaParticipant, KDA_PARTICIPANT_EDEFAULT, oldKdaParticipantESet ) );
}
}

/**
Expand All @@ -501,13 +527,15 @@ public boolean isSetKdaParticipant() {
public NotificationChain eInverseAdd( InternalEObject otherEnd, int featureID, NotificationChain msgs ) {
switch( featureID ) {
case SclPackage.GSE_SETTINGS__PARENT_SERVICES:
if( eInternalContainer() != null )
if( eInternalContainer() != null ) {
msgs = eBasicRemoveFromContainer( msgs );
}
return basicSetParentServices( ( Services ) otherEnd, msgs );
case SclPackage.GSE_SETTINGS__MC_SECURITY:
if( mcSecurity != null )
if( mcSecurity != null ) {
msgs = ( ( InternalEObject ) mcSecurity ).eInverseRemove( this,
EOPPOSITE_FEATURE_BASE - SclPackage.GSE_SETTINGS__MC_SECURITY, null, msgs );
}
return basicSetMcSecurity( ( McSecurity ) otherEnd, msgs );
}
return super.eInverseAdd( otherEnd, featureID, msgs );
Expand Down Expand Up @@ -648,24 +676,32 @@ public boolean eIsSet( int featureID ) {
*/
@Override
public String toString() {
if( eIsProxy() ) return super.toString();
if( eIsProxy() ) {
return super.toString();
}

StringBuilder result = new StringBuilder( super.toString() );
result.append( " (appID: " );
if( appIDESet )
if( appIDESet ) {
result.append( appID );
else
}
else {
result.append( "<unset>" );
}
result.append( ", dataLabel: " );
if( dataLabelESet )
if( dataLabelESet ) {
result.append( dataLabel );
else
}
else {
result.append( "<unset>" );
}
result.append( ", kdaParticipant: " );
if( kdaParticipantESet )
if( kdaParticipantESet ) {
result.append( kdaParticipant );
else
}
else {
result.append( "<unset>" );
}
result.append( ')' );
return result.toString();
}
Expand Down
Loading

0 comments on commit 6b381ad

Please sign in to comment.