Commit ff0eafcf authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '48-add-link-lnode-lnodetype' into 'master'

Resolve "add link LNode -> LNodeType"

Closes #48

See merge request RiseClipseGroup/RiseClipseMetamodel_SCL2003!43
parents 6ba06474 4943f556
......@@ -1290,3 +1290,5 @@ _UI_SDI_RefersToSDO_feature = Refers To SDO
_UI_SDI_RefersToAbstractDataAttribute_feature = Refers To Abstract Data Attribute
_UI_IRiseClipseConsole_type = IRise Clipse Console
_UI_SclObject_explicitLinksBuilt_feature = Explicit Links Built
_UI_LNodeType_ReferredByLNode_feature = Referred By LNode
_UI_LNode_RefersToLNodeType_feature = Refers To LNode Type
......@@ -66,6 +66,7 @@ public class LNodeItemProvider extends UnNamingItemProvider {
addLnTypePropertyDescriptor(object);
addPrefixPropertyDescriptor(object);
addRefersToAnyLNPropertyDescriptor(object);
addRefersToLNodeTypePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
......@@ -224,6 +225,28 @@ public class LNodeItemProvider extends UnNamingItemProvider {
null));
}
/**
* This adds a property descriptor for the Refers To LNode Type feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addRefersToLNodeTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LNode_RefersToLNodeType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LNode_RefersToLNodeType_feature", "_UI_LNode_type"),
SclPackage.eINSTANCE.getLNode_RefersToLNodeType(),
true,
false,
true,
null,
null,
null));
}
/**
* This returns LNode.gif.
* <!-- begin-user-doc -->
......
......@@ -64,6 +64,7 @@ public class LNodeTypeItemProvider extends IDNamingItemProvider {
addIedTypePropertyDescriptor(object);
addLnClassPropertyDescriptor(object);
addReferredByAnyLNPropertyDescriptor(object);
addReferredByLNodePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
......@@ -134,6 +135,28 @@ public class LNodeTypeItemProvider extends IDNamingItemProvider {
null));
}
/**
* This adds a property descriptor for the Referred By LNode feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addReferredByLNodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LNodeType_ReferredByLNode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LNodeType_ReferredByLNode_feature", "_UI_LNodeType_type"),
SclPackage.eINSTANCE.getLNodeType_ReferredByLNode(),
true,
false,
true,
null,
null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
......
......@@ -508,6 +508,9 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByAnyLN" ordered="false"
upperBound="-1" eType="#//AnyLN" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//AnyLN/RefersToLNodeType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByLNode" ordered="false"
upperBound="-1" eType="#//LNode" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNode/RefersToLNodeType"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProtNs" eSuperTypes="#//SclObject">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
......@@ -1866,6 +1869,9 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentLNodeContainer" ordered="false"
eType="#//LNodeContainer" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNodeContainer/LNode"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="RefersToLNodeType" ordered="false"
eType="#//LNodeType" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNodeType/ReferredByLNode"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LNodeContainer" eSuperTypes="#//Naming">
<eStructuralFeatures xsi:type="ecore:EReference" name="LNode" ordered="false"
......
......@@ -319,6 +319,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/DO"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ParentDataTypeTemplates"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ReferredByAnyLN"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeType/ReferredByLNode"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//ProtNs">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//ProtNs/type"/>
......@@ -942,6 +943,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SCL.ecore#//LNode/prefix"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNode/RefersToAnyLN"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference SCL.ecore#//LNode/ParentLNodeContainer"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SCL.ecore#//LNode/RefersToLNodeType"/>
</genClasses>
<genClasses ecoreClass="SCL.ecore#//LNodeContainer">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SCL.ecore#//LNodeContainer/LNode"/>
......
......@@ -35,6 +35,7 @@ package fr.centralesupelec.edf.riseclipse.iec61850.scl;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getPrefix <em>Prefix</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToAnyLN <em>Refers To Any LN</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getParentLNodeContainer <em>Parent LNode Container</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNode()
......@@ -439,4 +440,55 @@ public interface LNode extends UnNaming {
*/
void setParentLNodeContainer(LNodeContainer value);
/**
* Returns the value of the '<em><b>Refers To LNode Type</b></em>' reference.
* It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Refers To LNode Type</em>' reference.
* @see #isSetRefersToLNodeType()
* @see #unsetRefersToLNodeType()
* @see #setRefersToLNodeType(LNodeType)
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNode_RefersToLNodeType()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode
* @model opposite="ReferredByLNode" resolveProxies="false" unsettable="true" transient="true" ordered="false"
* @generated
*/
LNodeType getRefersToLNodeType();
/**
* Sets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Refers To LNode Type</em>' reference.
* @see #isSetRefersToLNodeType()
* @see #unsetRefersToLNodeType()
* @see #getRefersToLNodeType()
* @generated
*/
void setRefersToLNodeType(LNodeType value);
/**
* Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetRefersToLNodeType()
* @see #getRefersToLNodeType()
* @see #setRefersToLNodeType(LNodeType)
* @generated
*/
void unsetRefersToLNodeType();
/**
* Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}' reference is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Refers To LNode Type</em>' reference is set.
* @see #unsetRefersToLNodeType()
* @see #getRefersToLNodeType()
* @see #setRefersToLNodeType(LNodeType)
* @generated
*/
boolean isSetRefersToLNodeType();
} // LNode
......@@ -34,6 +34,7 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getDO <em>DO</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getParentDataTypeTemplates <em>Parent Data Type Templates</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByAnyLN <em>Referred By Any LN</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}</li>
* </ul>
*
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNodeType()
......@@ -254,4 +255,41 @@ public interface LNodeType extends IDNaming {
*/
boolean isSetReferredByAnyLN();
/**
* Returns the value of the '<em><b>Referred By LNode</b></em>' reference list.
* The list contents are of type {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode}.
* It is bidirectional and its opposite is '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Referred By LNode</em>' reference list.
* @see #isSetReferredByLNode()
* @see #unsetReferredByLNode()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage#getLNodeType_ReferredByLNode()
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType
* @model opposite="RefersToLNodeType" resolveProxies="false" unsettable="true" transient="true" ordered="false"
* @generated
*/
EList<LNode> getReferredByLNode();
/**
* Unsets the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetReferredByLNode()
* @see #getReferredByLNode()
* @generated
*/
void unsetReferredByLNode();
/**
* Returns whether the value of the '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}' reference list is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Referred By LNode</em>' reference list is set.
* @see #unsetReferredByLNode()
* @see #getReferredByLNode()
* @generated
*/
boolean isSetReferredByLNode();
} // LNodeType
......@@ -6356,6 +6356,15 @@ public interface SclPackage extends EPackage {
*/
int LNODE_TYPE__REFERRED_BY_ANY_LN = ID_NAMING_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Referred By LNode</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LNODE_TYPE__REFERRED_BY_LNODE = ID_NAMING_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>LNode Type</em>' class.
* <!-- begin-user-doc -->
......@@ -6363,7 +6372,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int LNODE_TYPE_FEATURE_COUNT = ID_NAMING_FEATURE_COUNT + 5;
int LNODE_TYPE_FEATURE_COUNT = ID_NAMING_FEATURE_COUNT + 6;
/**
* The operation id for the '<em>Build Explicit Links</em>' operation.
......@@ -18515,6 +18524,15 @@ public interface SclPackage extends EPackage {
*/
int LNODE__PARENT_LNODE_CONTAINER = UN_NAMING_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Refers To LNode Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LNODE__REFERS_TO_LNODE_TYPE = UN_NAMING_FEATURE_COUNT + 8;
/**
* The number of structural features of the '<em>LNode</em>' class.
* <!-- begin-user-doc -->
......@@ -18522,7 +18540,7 @@ public interface SclPackage extends EPackage {
* @generated
* @ordered
*/
int LNODE_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 8;
int LNODE_FEATURE_COUNT = UN_NAMING_FEATURE_COUNT + 9;
/**
* The operation id for the '<em>Build Explicit Links</em>' operation.
......@@ -23705,6 +23723,17 @@ public interface SclPackage extends EPackage {
*/
EReference getLNodeType_ReferredByAnyLN();
/**
* Returns the meta object for the reference list '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode <em>Referred By LNode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Referred By LNode</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType#getReferredByLNode()
* @see #getLNodeType()
* @generated
*/
EReference getLNodeType_ReferredByLNode();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.ProtNs <em>Prot Ns</em>}'.
* <!-- begin-user-doc -->
......@@ -30170,6 +30199,17 @@ public interface SclPackage extends EPackage {
*/
EReference getLNode_ParentLNodeContainer();
/**
* Returns the meta object for the reference '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType <em>Refers To LNode Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Refers To LNode Type</em>'.
* @see fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode#getRefersToLNodeType()
* @see #getLNode()
* @generated
*/
EReference getLNode_RefersToLNodeType();
/**
* Returns the meta object for class '{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeContainer <em>LNode Container</em>}'.
* <!-- begin-user-doc -->
......@@ -2455,7 +2455,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
// serviceType Optional, values: Poll, Report, GOOSE, SMV, Typically used at system design time to specify the service type to be used for sending the needed input data
if(( getIedName() == null ) || getIedName().isEmpty() ) {
// no warning id no iedName
// no warning if no iedName
console.verbose( messagePrefix + "do not look for DA because iedName is missing" );
return Pair.of( null, null );
}
......
......@@ -33,6 +33,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.AnyLN;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.DO;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.DataTypeTemplates;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNode;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.LNodeType;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
......@@ -49,6 +50,7 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getDO <em>DO</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getParentDataTypeTemplates <em>Parent Data Type Templates</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getReferredByAnyLN <em>Referred By Any LN</em>}</li>
* <li>{@link fr.centralesupelec.edf.riseclipse.iec61850.scl.impl.LNodeTypeImpl#getReferredByLNode <em>Referred By LNode</em>}</li>
* </ul>
*
* @generated
......@@ -132,6 +134,16 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
*/
protected EList<AnyLN> referredByAnyLN;
/**
* The cached value of the '{@link #getReferredByLNode() <em>Referred By LNode</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReferredByLNode()
* @generated
* @ordered
*/
protected EList<LNode> referredByLNode;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -360,6 +372,39 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
return referredByAnyLN != null && ((InternalEList.Unsettable<?>)referredByAnyLN).isSet();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<LNode> getReferredByLNode() {
if (referredByLNode == null) {
referredByLNode = new EObjectWithInverseEList.Unsettable<LNode>(LNode.class, this, SclPackage.LNODE_TYPE__REFERRED_BY_LNODE, SclPackage.LNODE__REFERS_TO_LNODE_TYPE);
}
return referredByLNode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void unsetReferredByLNode() {
if (referredByLNode != null) ((InternalEList.Unsettable<?>)referredByLNode).unset();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isSetReferredByLNode() {
return referredByLNode != null && ((InternalEList.Unsettable<?>)referredByLNode).isSet();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -377,6 +422,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
return basicSetParentDataTypeTemplates((DataTypeTemplates)otherEnd, msgs);
case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferredByAnyLN()).basicAdd(otherEnd, msgs);
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getReferredByLNode()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
......@@ -395,6 +442,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
return basicSetParentDataTypeTemplates(null, msgs);
case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN:
return ((InternalEList<?>)getReferredByAnyLN()).basicRemove(otherEnd, msgs);
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
return ((InternalEList<?>)getReferredByLNode()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
......@@ -431,6 +480,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
return getParentDataTypeTemplates();
case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN:
return getReferredByAnyLN();
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
return getReferredByLNode();
}
return super.eGet(featureID, resolve, coreType);
}
......@@ -461,6 +512,10 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
getReferredByAnyLN().clear();
getReferredByAnyLN().addAll((Collection<? extends AnyLN>)newValue);
return;
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
getReferredByLNode().clear();
getReferredByLNode().addAll((Collection<? extends LNode>)newValue);
return;
}
super.eSet(featureID, newValue);
}
......@@ -488,6 +543,9 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN:
unsetReferredByAnyLN();
return;
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
unsetReferredByLNode();
return;
}
super.eUnset(featureID);
}
......@@ -510,6 +568,8 @@ public class LNodeTypeImpl extends IDNamingImpl implements LNodeType {
return getParentDataTypeTemplates() != null;
case SclPackage.LNODE_TYPE__REFERRED_BY_ANY_LN:
return isSetReferredByAnyLN();
case SclPackage.LNODE_TYPE__REFERRED_BY_LNODE:
return isSetReferredByLNode();
}
return super.eIsSet(featureID);
}
......
......@@ -3249,6 +3249,16 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return (EReference)getLNodeType().getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getLNodeType_ReferredByLNode() {
return (EReference)getLNodeType().getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......@@ -9565,6 +9575,16 @@ public class SclPackageImpl extends EPackageImpl implements SclPackage {
return (EReference)getLNode().getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getLNode_RefersToLNodeType() {
return (EReference)getLNode().getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -508,6 +508,9 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByAnyLN" ordered="false"
upperBound="-1" eType="#//AnyLN" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//AnyLN/RefersToLNodeType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ReferredByLNode" ordered="false"
upperBound="-1" eType="#//LNode" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNode/RefersToLNodeType"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProtNs" eSuperTypes="#//SclObject">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
......@@ -1866,6 +1869,9 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="ParentLNodeContainer" ordered="false"
eType="#//LNodeContainer" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNodeContainer/LNode"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="RefersToLNodeType" ordered="false"
eType="#//LNodeType" transient="true" unsettable="true" resolveProxies="false"
eOpposite="#//LNodeType/ReferredByLNode"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LNodeContainer" eSuperTypes="#//Naming">
<eStructuralFeatures xsi:type="ecore:EReference" name="LNode" ordered="false"
......
......@@ -33,14 +33,18 @@ import fr.centralesupelec.edf.riseclipse.iec61850.scl.LN;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SCL;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclObject;
import fr.centralesupelec.edf.riseclipse.util.IRiseClipseConsole;
import fr.centralesupelec.edf.riseclipse.util.RiseClipseFatalException;
public class SclUtilities {
public static SCL getSCL( SclObject object ) {
public static @NonNull SCL getSCL( SclObject object ) {
EObject scl = object;
while(( scl != null ) && ! ( scl instanceof SCL )) {
scl = scl.eContainer();
}
if( scl == null ) {
throw new RiseClipseFatalException( "root container is not SCL", null );
}
return ( SCL ) scl;
}
......
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