...
 
Commits (2)
...@@ -1401,13 +1401,13 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements ...@@ -1401,13 +1401,13 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
String messagePrefix = "[SCL links] while resolving link from AbstractDataAttribute on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from AbstractDataAttribute on line " + getLineNumber() + ": ";
if(( getType() == null ) || getType().isEmpty() ) { if(( getType() == null ) || getType().isEmpty() ) {
console.warning( messagePrefix + "type is missing" ); console.warning( messagePrefix, "type is missing" );
return; return;
} }
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates(); DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) { if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" ); console.warning( messagePrefix, "DataTypeTemplates is missing" );
return; return;
} }
...@@ -1428,7 +1428,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements ...@@ -1428,7 +1428,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
return; return;
} }
setRefersToEnumType( res.get( 0 ) ); setRefersToEnumType( res.get( 0 ) );
console.info( "[SCL links] AbstractDataAttribute on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToEnumType().getLineNumber() ); console.info( "[SCL links] AbstractDataAttribute on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToEnumType().getLineNumber() );
} }
else if( "Struct".equals( getBType() )) { else if( "Struct".equals( getBType() )) {
...@@ -1447,7 +1447,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements ...@@ -1447,7 +1447,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
return; return;
} }
setRefersToDAType( res.get( 0 ) ); setRefersToDAType( res.get( 0 ) );
console.info( "[SCL links] AbstractDataAttribute on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToDAType().getLineNumber() ); console.info( "[SCL links] AbstractDataAttribute on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToDAType().getLineNumber() );
} }
} }
......
...@@ -1513,12 +1513,12 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN { ...@@ -1513,12 +1513,12 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
String messagePrefix = "[SCL links] while resolving link from AnyLN on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from AnyLN on line " + getLineNumber() + ": ";
if(( getLnType() == null ) || getLnType().isEmpty() ) { if(( getLnType() == null ) || getLnType().isEmpty() ) {
console.warning( messagePrefix + "lnType is missing" ); console.warning( messagePrefix, "lnType is missing" );
return; return;
} }
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates(); DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) { if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" ); console.warning( messagePrefix, "DataTypeTemplates is missing" );
return; return;
} }
...@@ -1535,10 +1535,10 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN { ...@@ -1535,10 +1535,10 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
return; return;
} }
setRefersToLNodeType( res.get( 0 ) ); setRefersToLNodeType( res.get( 0 ) );
console.info( "[SCL links] AnyLN on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToLNodeType().getLineNumber() ); console.info( "[SCL links] AnyLN on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToLNodeType().getLineNumber() );
if(( getLnClass() != null ) && ! getLnClass().equals( getRefersToLNodeType().getLnClass() )) { if(( getLnClass() != null ) && ! getLnClass().equals( getRefersToLNodeType().getLnClass() )) {
console.warning( messagePrefix + "lnClass in " + mess + "(" + getRefersToLNodeType().getLnClass() + ") is not " + getLnClass() ); console.warning( messagePrefix, "lnClass in ", mess, "(", getRefersToLNodeType().getLnClass(), ") is not ", getLnClass() );
} }
} }
......
...@@ -1179,15 +1179,15 @@ public class AssociationImpl extends BaseElementImpl implements Association { ...@@ -1179,15 +1179,15 @@ public class AssociationImpl extends BaseElementImpl implements Association {
String messagePrefix = "[SCL links] while resolving link from Association on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from Association on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) { if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing " ); console.warning( messagePrefix, "iedName is missing " );
return; return;
} }
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing " ); console.warning( messagePrefix, "ldInst is missing " );
return; return;
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing " ); console.warning( messagePrefix, "lnClass is missing " );
return; return;
} }
...@@ -1199,7 +1199,7 @@ public class AssociationImpl extends BaseElementImpl implements Association { ...@@ -1199,7 +1199,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
// find inside an LDevice with // find inside an LDevice with
// LDevice.name == Association.ldInst // LDevice.name == Association.ldInst
...@@ -1209,7 +1209,7 @@ public class AssociationImpl extends BaseElementImpl implements Association { ...@@ -1209,7 +1209,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", lDevice.getLeft().getLineNumber() );
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() ); Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess3 = "LN( lnClass = " + getLnClass(); String mess3 = "LN( lnClass = " + getLnClass();
...@@ -1223,7 +1223,7 @@ public class AssociationImpl extends BaseElementImpl implements Association { ...@@ -1223,7 +1223,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
return; return;
} }
setRefersToAnyLN( anyLN.getLeft() ); setRefersToAnyLN( anyLN.getLeft() );
console.info( "[SCL links] Association on line " + getLineNumber() + " refers to " + mess3 + " on line " + getRefersToAnyLN().getLineNumber() ); console.info( "[SCL links] Association on line ", getLineNumber(), " refers to ", mess3, " on line ", getRefersToAnyLN().getLineNumber() );
} }
} //AssociationImpl } //AssociationImpl
...@@ -1088,21 +1088,21 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN { ...@@ -1088,21 +1088,21 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
String messagePrefix = "[SCL links] while resolving link from ClientLN on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from ClientLN on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) { if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" ); console.warning( messagePrefix, "iedName is missing" );
return; return;
} }
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" ); console.warning( messagePrefix, "ldInst is missing" );
return; return;
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" ); console.warning( messagePrefix, "lnClass is missing" );
return; return;
} }
// If the reference is to an LN at a pure client access point, then the value of ldInst shall be LD0 // If the reference is to an LN at a pure client access point, then the value of ldInst shall be LD0
if( "LD0".equals( getLdInst() )) { if( "LD0".equals( getLdInst() )) {
console.verbose( messagePrefix + "ldInst is LD0: pure client access point, therefore no link" ); console.verbose( messagePrefix, "ldInst is LD0: pure client access point, therefore no link" );
return; return;
} }
...@@ -1114,16 +1114,16 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN { ...@@ -1114,16 +1114,16 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
Pair< AccessPoint, Integer > ap = null; Pair< AccessPoint, Integer > ap = null;
if(( getApRef() == null ) || getApRef().isEmpty() ) { if(( getApRef() == null ) || getApRef().isEmpty() ) {
if( ied.getLeft().getAccessPoint().size() == 0 ) { if( ied.getLeft().getAccessPoint().size() == 0 ) {
console.warning( messagePrefix + "no AccessPoint found in ied ( name = " + ied.getLeft().getName() + " )" ); console.warning( messagePrefix, "no AccessPoint found in ied ( name = ", ied.getLeft().getName(), " )" );
return; return;
} }
if( ied.getLeft().getAccessPoint().size() > 1 ) { if( ied.getLeft().getAccessPoint().size() > 1 ) {
console.warning( messagePrefix + "found several AccessPoint in ied ( name = " + ied.getLeft().getName() + " ) but apRef not specified" ); console.warning( messagePrefix, "found several AccessPoint in ied ( name = ", ied.getLeft().getName(), " ) but apRef not specified" );
return; return;
} }
ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 ); ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 );
...@@ -1135,7 +1135,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN { ...@@ -1135,7 +1135,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + ap.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", ap.getLeft().getLineNumber() );
} }
Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ap.getLeft(), getLdInst() ); Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ap.getLeft(), getLdInst() );
...@@ -1144,7 +1144,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN { ...@@ -1144,7 +1144,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3, lDevice.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess3 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess3, " on line ", lDevice.getLeft().getLineNumber() );
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() ); Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess4 = "LN( lnClass = " + getLnClass(); String mess4 = "LN( lnClass = " + getLnClass();
...@@ -1158,7 +1158,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN { ...@@ -1158,7 +1158,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
return; return;
} }
setRefersToAnyLN( anyLN.getLeft() ); setRefersToAnyLN( anyLN.getLeft() );
console.info( "[SCL links] ClientLN on line " + getLineNumber() + " refers to " + mess4 + " on line " + getRefersToAnyLN().getLineNumber() ); console.info( "[SCL links] ClientLN on line ", getLineNumber(), " refers to ", mess4, " on line ", getRefersToAnyLN().getLineNumber() );
} }
} //ClientLNImpl } //ClientLNImpl
...@@ -986,11 +986,11 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP { ...@@ -986,11 +986,11 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
String messagePrefix = "[SCL links] while resolving link from ConnectedAP on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from ConnectedAP on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) { if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" ); console.warning( messagePrefix, "iedName is missing" );
return; return;
} }
if(( getApName() == null ) || getApName().isEmpty() ) { if(( getApName() == null ) || getApName().isEmpty() ) {
console.warning( messagePrefix + "apName is missing" ); console.warning( messagePrefix, "apName is missing" );
return; return;
} }
...@@ -1002,7 +1002,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP { ...@@ -1002,7 +1002,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
Pair< AccessPoint, Integer > ap = SclUtilities.getAccessPoint( ied.getLeft(), getApName() ); Pair< AccessPoint, Integer > ap = SclUtilities.getAccessPoint( ied.getLeft(), getApName() );
String mess2 = "AccessPoint( name = " + getApName() + " )"; String mess2 = "AccessPoint( name = " + getApName() + " )";
if( ap.getLeft() == null ) { if( ap.getLeft() == null ) {
...@@ -1010,7 +1010,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP { ...@@ -1010,7 +1010,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
return; return;
} }
setRefersToAccessPoint( ap.getLeft() ); setRefersToAccessPoint( ap.getLeft() );
console.info( "[SCL links] ConnectedAP on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToAccessPoint().getLineNumber() ); console.info( "[SCL links] ConnectedAP on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToAccessPoint().getLineNumber() );
} }
} //ConnectedAPImpl } //ConnectedAPImpl
...@@ -657,11 +657,11 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl ...@@ -657,11 +657,11 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
String messagePrefix = "[SCL links] while resolving link from ControlBlock on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from ControlBlock on line " + getLineNumber() + ": ";
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" ); console.warning( messagePrefix, "ldInst is missing" );
return; return;
} }
if(( getCbName() == null ) || getCbName().isEmpty() ) { if(( getCbName() == null ) || getCbName().isEmpty() ) {
console.warning( messagePrefix + "cbName is missing" ); console.warning( messagePrefix, "cbName is missing" );
return; return;
} }
...@@ -679,12 +679,12 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl ...@@ -679,12 +679,12 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", lDevice.getLeft().getLineNumber() );
// Find a ControlWithIEDName inside LN0 of LDevice with // Find a ControlWithIEDName inside LN0 of LDevice with
// ControlWithIEDName.name == ControlBlock.bName // ControlWithIEDName.name == ControlBlock.bName
if( lDevice.getLeft().getLN0() == null ) { if( lDevice.getLeft().getLN0() == null ) {
console.warning( messagePrefix + "LN0 is missing" ); console.warning( messagePrefix, "LN0 is missing" );
return; return;
} }
...@@ -704,7 +704,7 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl ...@@ -704,7 +704,7 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
return; return;
} }
setRefersToControlWithIEDName( res2.get( 0 )); setRefersToControlWithIEDName( res2.get( 0 ));
console.info( "[SCL links] ControlBlock on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToControlWithIEDName().getLineNumber() ); console.info( "[SCL links] ControlBlock on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToControlWithIEDName().getLineNumber() );
} }
} //ControlBlockImpl } //ControlBlockImpl
...@@ -576,7 +576,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control { ...@@ -576,7 +576,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control {
String messagePrefix = "[SCL links] while resolving link from Control on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from Control on line " + getLineNumber() + ": ";
if(( getDatSet() == null ) || getDatSet().isEmpty() ) { if(( getDatSet() == null ) || getDatSet().isEmpty() ) {
console.warning( messagePrefix + "datSet is missing" ); console.warning( messagePrefix, "datSet is missing" );
return; return;
} }
...@@ -598,7 +598,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control { ...@@ -598,7 +598,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control {
return; return;
} }
setRefersToDataSet( res.get( 0 )); setRefersToDataSet( res.get( 0 ));
console.info( "[SCL links] Control on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToDataSet().getLineNumber() ); console.info( "[SCL links] Control on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToDataSet().getLineNumber() );
} }
} //ControlImpl } //ControlImpl
...@@ -966,7 +966,7 @@ public class DAIImpl extends UnNamingImpl implements DAI { ...@@ -966,7 +966,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
String messagePrefix = "[SCL links] while resolving link from DAI on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from DAI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) { if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" ); console.warning( messagePrefix, "name is missing" );
return; return;
} }
...@@ -985,13 +985,13 @@ public class DAIImpl extends UnNamingImpl implements DAI { ...@@ -985,13 +985,13 @@ public class DAIImpl extends UnNamingImpl implements DAI {
// No error or warning messages here: if this happens, error should have been detected before // No error or warning messages here: if this happens, error should have been detected before
DO do_ = getParentDOI().getRefersToDO(); DO do_ = getParentDOI().getRefersToDO();
if( do_ == null ) return; if( do_ == null ) return;
console.verbose( messagePrefix + "found DO on line " + do_.getLineNumber() ); console.verbose( messagePrefix, "found DO on line ", do_.getLineNumber() );
do_.buildExplicitLinks( console, false ); do_.buildExplicitLinks( console, false );
DOType dot = do_.getRefersToDOType(); DOType dot = do_.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( dot == null ) return; if( dot == null ) return;
console.verbose( messagePrefix + "found DOType on line " + dot.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", dot.getLineNumber() );
List< DA > res = List< DA > res =
dot dot
...@@ -1006,7 +1006,7 @@ public class DAIImpl extends UnNamingImpl implements DAI { ...@@ -1006,7 +1006,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
return; return;
} }
setRefersToAbstractDataAttribute( res.get( 0 ) ); setRefersToAbstractDataAttribute( res.get( 0 ) );
console.info( "[SCL links] DAI on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToAbstractDataAttribute().getLineNumber() ); console.info( "[SCL links] DAI on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToAbstractDataAttribute().getLineNumber() );
} }
private void doBuildExplicitLinkWithParentSDI( IRiseClipseConsole console, String messagePrefix ) { private void doBuildExplicitLinkWithParentSDI( IRiseClipseConsole console, String messagePrefix ) {
...@@ -1014,12 +1014,12 @@ public class DAIImpl extends UnNamingImpl implements DAI { ...@@ -1014,12 +1014,12 @@ public class DAIImpl extends UnNamingImpl implements DAI {
AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute(); AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute();
if( att == null ) return; if( att == null ) return;
att.buildExplicitLinks( console, false ); att.buildExplicitLinks( console, false );
console.verbose( messagePrefix + "found AbstractDataAttribute on line " + att.getLineNumber() ); console.verbose( messagePrefix, "found AbstractDataAttribute on line ", att.getLineNumber() );
DAType dat = att.getRefersToDAType(); DAType dat = att.getRefersToDAType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( dat == null ) return; if( dat == null ) return;
console.verbose( messagePrefix + "found DAType on line " + dat.getLineNumber() ); console.verbose( messagePrefix, "found DAType on line ", dat.getLineNumber() );
List< BDA > res = List< BDA > res =
dat dat
...@@ -1034,7 +1034,7 @@ public class DAIImpl extends UnNamingImpl implements DAI { ...@@ -1034,7 +1034,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
return; return;
} }
setRefersToAbstractDataAttribute( res.get( 0 )); setRefersToAbstractDataAttribute( res.get( 0 ));
console.info( "[SCL links] DAI on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToAbstractDataAttribute().getLineNumber() ); console.info( "[SCL links] DAI on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToAbstractDataAttribute().getLineNumber() );
} }
} //DAIImpl } //DAIImpl
...@@ -835,14 +835,14 @@ public class DOIImpl extends UnNamingImpl implements DOI { ...@@ -835,14 +835,14 @@ public class DOIImpl extends UnNamingImpl implements DOI {
String messagePrefix = "[SCL links] while resolving link from DOI on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from DOI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) { if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" ); console.warning( messagePrefix, "name is missing" );
return; return;
} }
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( getParentAnyLN() == null ) return; if( getParentAnyLN() == null ) return;
if( getParentAnyLN().getRefersToLNodeType() == null ) return; if( getParentAnyLN().getRefersToLNodeType() == null ) return;
console.verbose( messagePrefix + "found LNodeType on line " + getParentAnyLN().getRefersToLNodeType().getLineNumber() ); console.verbose( messagePrefix, "found LNodeType on line ", getParentAnyLN().getRefersToLNodeType().getLineNumber() );
List< DO > res = List< DO > res =
getParentAnyLN() getParentAnyLN()
...@@ -858,7 +858,7 @@ public class DOIImpl extends UnNamingImpl implements DOI { ...@@ -858,7 +858,7 @@ public class DOIImpl extends UnNamingImpl implements DOI {
return; return;
} }
setRefersToDO( res.get( 0 ) ); setRefersToDO( res.get( 0 ) );
console.info( "[SCL links] DOI on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToDO().getLineNumber() ); console.info( "[SCL links] DOI on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToDO().getLineNumber() );
} }
} //DOIImpl } //DOIImpl
...@@ -492,7 +492,7 @@ public class DOImpl extends AbstractDataObjectImpl implements DO { ...@@ -492,7 +492,7 @@ public class DOImpl extends AbstractDataObjectImpl implements DO {
String messagePrefix = "[SCL links] while resolving link from DO on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from DO on line " + getLineNumber() + ": ";
if(( getType() == null ) || getType().isEmpty() ) { if(( getType() == null ) || getType().isEmpty() ) {
console.warning( messagePrefix + "type is missing" ); console.warning( messagePrefix, "type is missing" );
return; return;
} }
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
...@@ -512,7 +512,7 @@ public class DOImpl extends AbstractDataObjectImpl implements DO { ...@@ -512,7 +512,7 @@ public class DOImpl extends AbstractDataObjectImpl implements DO {
return; return;
} }
setRefersToDOType( res.get( 0 )); setRefersToDOType( res.get( 0 ));
console.info( "[SCL links] DO on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToDOType().getLineNumber() ); console.info( "[SCL links] DO on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToDOType().getLineNumber() );
} }
} //DOImpl } //DOImpl
...@@ -2456,13 +2456,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2456,13 +2456,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
if(( getIedName() == null ) || getIedName().isEmpty() ) { if(( getIedName() == null ) || getIedName().isEmpty() ) {
// no warning if no iedName // no warning if no iedName
console.verbose( messagePrefix + "do not look for DA because iedName is missing" ); console.verbose( messagePrefix, "do not look for DA because iedName is missing" );
return Pair.of( null, null ); return Pair.of( null, null );
} }
if(( getDoName() == null ) || getDoName().isEmpty() ) { if(( getDoName() == null ) || getDoName().isEmpty() ) {
// No link if no doName // No link if no doName
console.verbose( messagePrefix + "doName is absent" ); console.verbose( messagePrefix, "doName is absent" );
return Pair.of( null, null ); return Pair.of( null, null );
} }
...@@ -2477,15 +2477,15 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2477,15 +2477,15 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, "IED( name = " + getIedName() + " )", ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, "IED( name = " + getIedName() + " )", ied.getRight() );
return Pair.of( null, null ); return Pair.of( null, null );
} }
console.verbose( messagePrefix + "found IED ( name = " + ied.getLeft().getName() + " ) on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found IED ( name = ", ied.getLeft().getName(), " ) on line ", ied.getLeft().getLineNumber() );
// Only now so that we can give back ied // Only now so that we can give back ied
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" ); console.warning( messagePrefix, "ldInst is missing" );
return Pair.of( ied.getLeft(), null ); return Pair.of( ied.getLeft(), null );
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" ); console.warning( messagePrefix, "lnClass is missing" );
return Pair.of( ied.getLeft(), null ); return Pair.of( ied.getLeft(), null );
} }
...@@ -2495,7 +2495,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2495,7 +2495,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
return Pair.of( ied.getLeft(), null ); return Pair.of( ied.getLeft(), null );
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", lDevice.getLeft().getLineNumber() );
Pair< IED, LDevice > finalRes = Pair.of( ied.getLeft(), lDevice.getLeft() ); Pair< IED, LDevice > finalRes = Pair.of( ied.getLeft(), lDevice.getLeft() );
...@@ -2510,12 +2510,12 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2510,12 +2510,12 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
return finalRes; return finalRes;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + anyLN.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", anyLN.getLeft().getLineNumber() );
anyLN.getLeft().buildExplicitLinks( console, false ); anyLN.getLeft().buildExplicitLinks( console, false );
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( anyLN.getLeft().getRefersToLNodeType() == null ) return finalRes; if( anyLN.getLeft().getRefersToLNodeType() == null ) return finalRes;
console.verbose( messagePrefix + "found LNodeType on line " + anyLN.getLeft().getRefersToLNodeType().getLineNumber() ); console.verbose( messagePrefix, "found LNodeType on line ", anyLN.getLeft().getRefersToLNodeType().getLineNumber() );
// doName and daName are structured using . as separator // doName and daName are structured using . as separator
// The first doName let us find the DO inside the LNodeType // The first doName let us find the DO inside the LNodeType
...@@ -2541,13 +2541,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2541,13 +2541,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
} }
AbstractDataObject ado = res3a.get( 0 ); AbstractDataObject ado = res3a.get( 0 );
console.verbose( messagePrefix + "found " + mess3a + " on line " + ado.getLineNumber() ); console.verbose( messagePrefix, "found ", mess3a, " on line ", ado.getLineNumber() );
ado.buildExplicitLinks( console, false ); ado.buildExplicitLinks( console, false );
for( int i = 1; i < doNames.length; ++i ) { for( int i = 1; i < doNames.length; ++i ) {
DOType doType = ado.getRefersToDOType(); DOType doType = ado.getRefersToDOType();
if( doType == null ) return finalRes; if( doType == null ) return finalRes;
console.verbose( messagePrefix + "found DOType on line " + doType.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", doType.getLineNumber() );
String name = doNames[i]; String name = doNames[i];
List< SDO > res3b = List< SDO > res3b =
doType doType
...@@ -2562,21 +2562,21 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2562,21 +2562,21 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes; return finalRes;
} }
ado = res3b.get( 0 ); ado = res3b.get( 0 );
console.verbose( messagePrefix + "found " + mess3b + " on line " + ado.getLineNumber() ); console.verbose( messagePrefix, "found ", mess3b, " on line ", ado.getLineNumber() );
ado.buildExplicitLinks( console, false ); ado.buildExplicitLinks( console, false );
} }
// Set link to DO/SDO only if no daName // Set link to DO/SDO only if no daName
if( getDaName() == null ) { if( getDaName() == null ) {
setRefersToAbstractDataObject( ado ); setRefersToAbstractDataObject( ado );
console.info( "[SCL links] ExtRef on line " + getLineNumber() + " refers to AbstractDataObject ( name = " + ado.getName() + " ) on line " + ado.getLineNumber() ); console.info( "[SCL links] ExtRef on line ", getLineNumber(), " refers to AbstractDataObject ( name = ", ado.getName(), " ) on line ", ado.getLineNumber() );
return finalRes; return finalRes;
} }
DOType doType = ado.getRefersToDOType(); DOType doType = ado.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( doType == null ) return finalRes; if( doType == null ) return finalRes;
console.verbose( messagePrefix + "found DOType on line " + doType.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", doType.getLineNumber() );
// The first daName gives us the DA inside the DOType // The first daName gives us the DA inside the DOType
// If daName is structured, find the DAType and its BDA using remaining daName // If daName is structured, find the DAType and its BDA using remaining daName
...@@ -2595,7 +2595,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2595,7 +2595,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes; return finalRes;
} }
AbstractDataAttribute da = res4a.get( 0 ); AbstractDataAttribute da = res4a.get( 0 );
console.verbose( messagePrefix + "found " + mess4a + " on line " + da.getLineNumber() ); console.verbose( messagePrefix, "found ", mess4a, " on line ", da.getLineNumber() );
for( int i = 1; i < daNames.length; ++i ) { for( int i = 1; i < daNames.length; ++i ) {
da.buildExplicitLinks( console, false ); da.buildExplicitLinks( console, false );
...@@ -2615,10 +2615,10 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2615,10 +2615,10 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes; return finalRes;
} }
da = res4b.get( 0 ); da = res4b.get( 0 );
console.verbose( messagePrefix + "found " + mess4b + " on line " + da.getLineNumber() ); console.verbose( messagePrefix, "found ", mess4b, " on line ", da.getLineNumber() );
} }
console.info( "[SCL links] ExtRef on line " + getLineNumber() + " refers to AbstractDataAttribute ( name = " + da.getName() + " ) on line " + da.getLineNumber() ); console.info( "[SCL links] ExtRef on line ", getLineNumber(), " refers to AbstractDataAttribute ( name = ", da.getName(), " ) on line ", da.getLineNumber() );
setRefersToAbstractDataAttribute( da ); setRefersToAbstractDataAttribute( da );
return finalRes; return finalRes;
...@@ -2640,7 +2640,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2640,7 +2640,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
if( ied == null ) return; if( ied == null ) return;
if(( getSrcCBName() == null ) || getSrcCBName().isEmpty() ) { if(( getSrcCBName() == null ) || getSrcCBName().isEmpty() ) {
console.verbose( messagePrefix + "srcCBName is absent" ); console.verbose( messagePrefix, "srcCBName is absent" );
return; return;
} }
...@@ -2652,7 +2652,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2652,7 +2652,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return; return;
} }
lDevice = lDevice1.getLeft(); lDevice = lDevice1.getLeft();
console.verbose( messagePrefix + "found " + mess5 + " on line " + lDevice.getLineNumber() ); console.verbose( messagePrefix, "found ", mess5, " on line ", lDevice.getLineNumber() );
} }
if( lDevice == null ) return; if( lDevice == null ) return;
...@@ -2671,7 +2671,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2671,7 +2671,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess6, anyLN.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess6, anyLN.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess6 + " on line " + anyLN.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess6, " on line ", anyLN.getLeft().getLineNumber() );
List< Control > listControls = new ArrayList< Control >(); List< Control > listControls = new ArrayList< Control >();
listControls.addAll( anyLN.getLeft().getLogControl() ); listControls.addAll( anyLN.getLeft().getLogControl() );
...@@ -2681,7 +2681,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2681,7 +2681,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
listControls.addAll( lDevice.getLN0().getSampledValueControl() ); listControls.addAll( lDevice.getLN0().getSampledValueControl() );
} }
if( listControls.size() == 0 ) { if( listControls.size() == 0 ) {
console.warning( messagePrefix + "control not found because there are none of them in AnyLN line " + anyLN.getLeft().getLineNumber() ); console.warning( messagePrefix, "control not found because there are none of them in AnyLN line ", anyLN.getLeft().getLineNumber() );
return; return;
} }
...@@ -2696,7 +2696,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef { ...@@ -2696,7 +2696,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return; return;
} }
setRefersToControl( res7.get( 0 )); setRefersToControl( res7.get( 0 ));
console.info( "[SCL links] ExtRef on line " + getLineNumber() + " refers to " + mess7 + " on line " + getRefersToControl().getLineNumber() ); console.info( "[SCL links] ExtRef on line ", getLineNumber(), " refers to ", mess7, " on line ", getRefersToControl().getLineNumber() );
} }
} //ExtRefImpl } //ExtRefImpl
...@@ -1065,15 +1065,15 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1065,15 +1065,15 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
String messagePrefix = "[SCL links] while resolving link from FCDA on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from FCDA on line " + getLineNumber() + ": ";
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" ); console.warning( messagePrefix, "ldInst is missing" );
return; return;
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" ); console.warning( messagePrefix, "lnClass is missing" );
return; return;
} }
if(( getDoName() == null ) || getDoName().isEmpty() ) { if(( getDoName() == null ) || getDoName().isEmpty() ) {
console.warning( messagePrefix + "doName is missing" ); console.warning( messagePrefix, "doName is missing" );
return; return;
} }
...@@ -1083,11 +1083,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1083,11 +1083,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
object = object.eContainer(); object = object.eContainer();
} }
if( object == null ) { if( object == null ) {
console.warning( messagePrefix + "AccessPoint not found" ); console.warning( messagePrefix, "AccessPoint not found" );
return; return;
} }
AccessPoint ap = ( AccessPoint ) object; AccessPoint ap = ( AccessPoint ) object;
console.verbose( messagePrefix + "found Server on line " + ap.getServer().getLineNumber() ); console.verbose( messagePrefix, "found Server on line ", ap.getServer().getLineNumber() );
Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ap, getLdInst() ); Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ap, getLdInst() );
String mess1 = "LDevice( inst = " + getLdInst() + " )"; String mess1 = "LDevice( inst = " + getLdInst() + " )";
...@@ -1095,7 +1095,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1095,7 +1095,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", lDevice.getLeft().getLineNumber() );
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() ); Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess2 = "LN( lnClass = " + getLnClass(); String mess2 = "LN( lnClass = " + getLnClass();
...@@ -1108,11 +1108,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1108,11 +1108,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + anyLN.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", anyLN.getLeft().getLineNumber() );
anyLN.getLeft().buildExplicitLinks( console, false ); anyLN.getLeft().buildExplicitLinks( console, false );
if( anyLN.getLeft().getRefersToLNodeType() == null ) return; if( anyLN.getLeft().getRefersToLNodeType() == null ) return;
console.verbose( messagePrefix + "found LNodeType on line " + anyLN.getLeft().getRefersToLNodeType().getLineNumber() ); console.verbose( messagePrefix, "found LNodeType on line ", anyLN.getLeft().getRefersToLNodeType().getLineNumber() );
// doName and daName are structured using . as separator // doName and daName are structured using . as separator
// The first doName let us find the DO inside the LNodeType // The first doName let us find the DO inside the LNodeType
...@@ -1136,13 +1136,13 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1136,13 +1136,13 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3a, res3a.size() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3a, res3a.size() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess3a + " on line " + res3a.get( 0 ).getLineNumber() ); console.verbose( messagePrefix, "found ", mess3a, " on line ", res3a.get( 0 ).getLineNumber() );
res3a.get( 0 ).buildExplicitLinks( console, false ); res3a.get( 0 ).buildExplicitLinks( console, false );
DOType doType = res3a.get( 0 ).getRefersToDOType(); DOType doType = res3a.get( 0 ).getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( doType == null ) return; if( doType == null ) return;
console.verbose( messagePrefix + "found DOType on line " + doType.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", doType.getLineNumber() );
for( int i = 1; i < doNames.length; ++i ) { for( int i = 1; i < doNames.length; ++i ) {
String name = doNames[i]; String name = doNames[i];
...@@ -1158,12 +1158,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1158,12 +1158,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3b, res3b.size() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3b, res3b.size() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess3b + " on line " + res3b.get( 0 ).getLineNumber() ); console.verbose( messagePrefix, "found ", mess3b, " on line ", res3b.get( 0 ).getLineNumber() );
res3b.get( 0 ).buildExplicitLinks( console, false ); res3b.get( 0 ).buildExplicitLinks( console, false );
doType = res3b.get( 0 ).getRefersToDOType(); doType = res3b.get( 0 ).getRefersToDOType();
if( doType == null ) return; if( doType == null ) return;
console.verbose( messagePrefix + "found DOType on line " + doType.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", doType.getLineNumber() );
} }
if( getDaName() != null ) { if( getDaName() != null ) {
...@@ -1184,7 +1184,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1184,7 +1184,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
return; return;
} }
AbstractDataAttribute da = res4a.get( 0 ); AbstractDataAttribute da = res4a.get( 0 );
console.verbose( messagePrefix + "found " + mess4a + " on line " + da.getLineNumber() ); console.verbose( messagePrefix, "found ", mess4a, " on line ", da.getLineNumber() );
for( int i = 1; i < daNames.length; ++i ) { for( int i = 1; i < daNames.length; ++i ) {
da.buildExplicitLinks( console, false ); da.buildExplicitLinks( console, false );
...@@ -1204,12 +1204,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1204,12 +1204,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
return; return;
} }
da = res4b.get( 0 ); da = res4b.get( 0 );
console.verbose( messagePrefix + "found " + mess4b + " on line " + da.getLineNumber() ); console.verbose( messagePrefix, "found ", mess4b, " on line ", da.getLineNumber() );
} }
// TODO: do we have to check if fc is right ? // TODO: do we have to check if fc is right ?
// TODO: ix is ignored ! // TODO: ix is ignored !
console.info( "[SCL links] FCDA on line " + getLineNumber() + " refers to AbstractDataAttribute ( name = " + da.getName() + " ) on line " + da.getLineNumber() ); console.info( "[SCL links] FCDA on line ", getLineNumber(), " refers to AbstractDataAttribute ( name = ", da.getName(), " ) on line ", da.getLineNumber() );
getRefersToAbstractDataAttribute().add( da ); getRefersToAbstractDataAttribute().add( da );
} }
...@@ -1225,11 +1225,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA { ...@@ -1225,11 +1225,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
if( getRefersToAbstractDataAttribute().size() > 0 ) { if( getRefersToAbstractDataAttribute().size() > 0 ) {
for( AbstractDataAttribute a : getRefersToAbstractDataAttribute() ) { for( AbstractDataAttribute a : getRefersToAbstractDataAttribute() ) {
console.info( "[SCL links] FCDA on line " + getLineNumber() + " refers to AbstractDataAttribute ( name = " + a.getName() + " ) on line " + a.getLineNumber() ); console.info( "[SCL links] FCDA on line ", getLineNumber(), " refers to AbstractDataAttribute ( name = ", a.getName(), " ) on line ", a.getLineNumber() );
} }
} }
else { else {
console.warning( "[SCL links] FCDA (line " + getLineNumber() + ") does not refer to any AbstractDataAttribute" ); console.warning( "[SCL links] FCDA (line ", getLineNumber(), ") does not refer to any AbstractDataAttribute" );
} }
} }
......
...@@ -1201,7 +1201,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName { ...@@ -1201,7 +1201,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
String messagePrefix = "[SCL links] while resolving link from IEDName on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from IEDName on line " + getLineNumber() + ": ";
if(( getValue() == null ) || getValue().isEmpty() ) { if(( getValue() == null ) || getValue().isEmpty() ) {
console.warning( messagePrefix + "value is missing" ); console.warning( messagePrefix, "value is missing" );
return; return;
} }
...@@ -1216,20 +1216,20 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName { ...@@ -1216,20 +1216,20 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
if(( getLdInst() == null ) || getLdInst().isEmpty() ) { if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
setRefersToIED( ied.getLeft() ); setRefersToIED( ied.getLeft() );
console.info( "IEDName on line " + getLineNumber() + " refers to " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.info( "IEDName on line ", getLineNumber(), " refers to ", mess1, " on line ", ied.getLeft().getLineNumber() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
Pair< AccessPoint, Integer > ap = null; Pair< AccessPoint, Integer > ap = null;
if(( getApRef() == null ) || getApRef().isEmpty() ) { if(( getApRef() == null ) || getApRef().isEmpty() ) {
if( ied.getLeft().getAccessPoint().size() == 0 ) { if( ied.getLeft().getAccessPoint().size() == 0 ) {
console.warning( messagePrefix + "no AccessPoint found in ied ( name = " + ied.getLeft().getName() + " )" ); console.warning( messagePrefix, "no AccessPoint found in ied ( name = ", ied.getLeft().getName(), " )" );
return; return;
} }
if( ied.getLeft().getAccessPoint().size() > 1 ) { if( ied.getLeft().getAccessPoint().size() > 1 ) {
console.warning( messagePrefix + "found several AccessPoint in ied ( name = " + ied.getLeft().getName() + " ) but apRef not specified" ); console.warning( messagePrefix, "found several AccessPoint in ied ( name = ", ied.getLeft().getName(), " ) but apRef not specified" );
return; return;
} }
ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 ); ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 );
...@@ -1241,7 +1241,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName { ...@@ -1241,7 +1241,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + ap.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", ap.getLeft().getLineNumber() );
} }
Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ied.getLeft(), getLdInst() ); Pair< LDevice, Integer > lDevice = SclUtilities.getLDevice( ied.getLeft(), getLdInst() );
String mess3 = "LDevice( inst = " + getLdInst() + " )"; String mess3 = "LDevice( inst = " + getLdInst() + " )";
...@@ -1251,10 +1251,10 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName { ...@@ -1251,10 +1251,10 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
setRefersToLDevice( lDevice.getLeft() ); setRefersToLDevice( lDevice.getLeft() );
console.info( "IEDName on line " + getLineNumber() + " refers to " + mess3 + " on line " + getRefersToLDevice().getLineNumber() ); console.info( "IEDName on line ", getLineNumber(), " refers to ", mess3, " on line ", getRefersToLDevice().getLineNumber() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess3 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess3, " on line ", lDevice.getLeft().getLineNumber() );
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() ); Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess4 = "LN( lnClass = " + getLnClass(); String mess4 = "LN( lnClass = " + getLnClass();
...@@ -1268,7 +1268,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName { ...@@ -1268,7 +1268,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
return; return;
} }
setRefersToAnyLN( anyLN.getLeft() ); setRefersToAnyLN( anyLN.getLeft() );
console.info( "[SCL links] ClientLN on line " + getLineNumber() + " refers to " + mess4 + " on line " + getRefersToAnyLN().getLineNumber() ); console.info( "[SCL links] ClientLN on line ", getLineNumber(), " refers to ", mess4, " on line ", getRefersToAnyLN().getLineNumber() );
} }
} //IEDNameImpl } //IEDNameImpl
...@@ -552,11 +552,11 @@ public class KDCImpl extends SclObjectImpl implements KDC { ...@@ -552,11 +552,11 @@ public class KDCImpl extends SclObjectImpl implements KDC {
String messagePrefix = "[SCL links] while resolving link from KDC on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from KDC on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) { if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" ); console.warning( messagePrefix, "iedName is missing" );
return; return;
} }
if(( getApName() == null ) || getApName().isEmpty() ) { if(( getApName() == null ) || getApName().isEmpty() ) {
console.warning( messagePrefix + "apName is missing" ); console.warning( messagePrefix, "apName is missing" );
return; return;
} }
...@@ -568,7 +568,7 @@ public class KDCImpl extends SclObjectImpl implements KDC { ...@@ -568,7 +568,7 @@ public class KDCImpl extends SclObjectImpl implements KDC {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
Pair< AccessPoint, Integer > ap = SclUtilities.getAccessPoint( ied.getLeft(), getApName() ); Pair< AccessPoint, Integer > ap = SclUtilities.getAccessPoint( ied.getLeft(), getApName() );
String mess2 = "AccessPoint( name = " + getApName() + " )"; String mess2 = "AccessPoint( name = " + getApName() + " )";
...@@ -577,7 +577,7 @@ public class KDCImpl extends SclObjectImpl implements KDC { ...@@ -577,7 +577,7 @@ public class KDCImpl extends SclObjectImpl implements KDC {
return; return;
} }
setRefersToAccessPoint( ap.getLeft() ); setRefersToAccessPoint( ap.getLeft() );
console.info( "[SCL links] KDC on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToAccessPoint().getLineNumber() ); console.info( "[SCL links] KDC on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToAccessPoint().getLineNumber() );
} }
} //KDCImpl } //KDCImpl
...@@ -1079,12 +1079,12 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1079,12 +1079,12 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
// Resolve only if attribute is not None // Resolve only if attribute is not None
// Default value is None // Default value is None
if(( getIedName() == null ) || getIedName().isEmpty() || "None".equals( getIedName() )) { if(( getIedName() == null ) || getIedName().isEmpty() || "None".equals( getIedName() )) {
console.verbose( messagePrefix + "link to AnyLN not resolved because iedName is absent or None" ); console.verbose( messagePrefix, "link to AnyLN not resolved because iedName is absent or None" );
return; return;
} }
if(( getLnClass() == null ) || getLnClass().isEmpty() ) { if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" ); console.warning( messagePrefix, "lnClass is missing" );
return; return;
} }
...@@ -1096,7 +1096,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1096,7 +1096,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess1 + " on line " + ied.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", ied.getLeft().getLineNumber() );
// find inside an LDevice with // find inside an LDevice with
// LDevice.name == LNode.ldInst // LDevice.name == LNode.ldInst
...@@ -1106,7 +1106,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1106,7 +1106,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() ); SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() );
return; return;
} }
console.verbose( messagePrefix + "found " + mess2 + " on line " + lDevice.getLeft().getLineNumber() ); console.verbose( messagePrefix, "found ", mess2, " on line ", lDevice.getLeft().getLineNumber() );
// find inside an LN with // find inside an LN with
// LN.lnClass == LNode.lnClass // LN.lnClass == LNode.lnClass
...@@ -1124,7 +1124,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1124,7 +1124,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
return; return;
} }
setRefersToAnyLN( anyLN.getLeft() ); setRefersToAnyLN( anyLN.getLeft() );
console.info( "[SCL links] LNode on line " + getLineNumber() + " refers to " + mess3 + " on line " + getRefersToAnyLN().getLineNumber() ); console.info( "[SCL links] LNode on line ", getLineNumber(), " refers to ", mess3, " on line ", getRefersToAnyLN().getLineNumber() );
} }
private void doBuildExplicitLNodeTypeLink( IRiseClipseConsole console, String mPrefix ) { private void doBuildExplicitLNodeTypeLink( IRiseClipseConsole console, String mPrefix ) {
...@@ -1134,12 +1134,12 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1134,12 +1134,12 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
// lnType The logical node type definition containing more detailed functional specification. Might be missing, if the LN is allocated to an IED. // lnType The logical node type definition containing more detailed functional specification. Might be missing, if the LN is allocated to an IED.
if(( getLnType() == null ) || getLnType().isEmpty() ) { if(( getLnType() == null ) || getLnType().isEmpty() ) {
console.verbose( messagePrefix + "link not resolved because lnType is missing" ); console.verbose( messagePrefix, "link not resolved because lnType is missing" );
return; return;
} }
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates(); DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) { if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" ); console.warning( messagePrefix, "DataTypeTemplates is missing" );
return; return;
} }
...@@ -1156,10 +1156,10 @@ public class LNodeImpl extends UnNamingImpl implements LNode { ...@@ -1156,10 +1156,10 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
return; return;
} }
setRefersToLNodeType( res.get( 0 ) ); setRefersToLNodeType( res.get( 0 ) );
console.info( "[SCL links] AnyLN on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToLNodeType().getLineNumber() ); console.info( "[SCL links] AnyLN on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToLNodeType().getLineNumber() );
if(( getLnClass() != null ) && ! getLnClass().equals( getRefersToLNodeType().getLnClass() )) { if(( getLnClass() != null ) && ! getLnClass().equals( getRefersToLNodeType().getLnClass() )) {
console.warning( messagePrefix + "lnClass in " + mess + "(" + getRefersToLNodeType().getLnClass() + ") is not " + getLnClass() ); console.warning( messagePrefix, "lnClass in ", mess, "(", getRefersToLNodeType().getLnClass(), ") is not ", getLnClass() );
} }
} }
......
...@@ -1254,7 +1254,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont ...@@ -1254,7 +1254,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
String messagePrefix = "[SCL links] while resolving link from LogControl on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from LogControl on line " + getLineNumber() + ": ";
if(( getLogName() == null ) || getLogName().isEmpty() ) { if(( getLogName() == null ) || getLogName().isEmpty() ) {
console.warning( messagePrefix + "logName is missing" ); console.warning( messagePrefix, "logName is missing" );
return; return;
} }
...@@ -1273,7 +1273,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont ...@@ -1273,7 +1273,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
return; return;
} }
lDevice = lDevice1.getLeft(); lDevice = lDevice1.getLeft();
console.verbose( messagePrefix + "found " + mess1 + " on line " + lDevice.getLineNumber() ); console.verbose( messagePrefix, "found ", mess1, " on line ", lDevice.getLineNumber() );
} }
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice, getLnClass(), getLnInst(), getPrefix() ); Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice, getLnClass(), getLnInst(), getPrefix() );
...@@ -1288,7 +1288,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont ...@@ -1288,7 +1288,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
return; return;
} }
setRefersToAnyLN( anyLN.getLeft() ); setRefersToAnyLN( anyLN.getLeft() );
console.info( "[SCL links] LogControl on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToAnyLN().getLineNumber() ); console.info( "[SCL links] LogControl on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToAnyLN().getLineNumber() );
} }
......
...@@ -974,7 +974,7 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -974,7 +974,7 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String messagePrefix = "[SCL links] while resolving link from SDI on line " + getLineNumber() + ": "; String messagePrefix = "[SCL links] while resolving link from SDI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) { if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" ); console.warning( messagePrefix, "name is missing" );
return; return;
} }
...@@ -993,13 +993,13 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -993,13 +993,13 @@ public class SDIImpl extends UnNamingImpl implements SDI {
DO do_ = getParentDOI().getRefersToDO(); DO do_ = getParentDOI().getRefersToDO();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( do_ == null ) return; if( do_ == null ) return;
console.verbose( messagePrefix + "found DO on line " + do_.getLineNumber() ); console.verbose( messagePrefix, "found DO on line ", do_.getLineNumber() );
do_.buildExplicitLinks( console, false ); do_.buildExplicitLinks( console, false );
DOType dot = do_.getRefersToDOType(); DOType dot = do_.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( dot == null ) return; if( dot == null ) return;
console.verbose( messagePrefix + "found DOType on line " + dot.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", dot.getLineNumber() );
List< SDO > res1 = List< SDO > res1 =
dot dot
...@@ -1011,12 +1011,12 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1011,12 +1011,12 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess1 = "SDO( name = " + getName() + " )"; String mess1 = "SDO( name = " + getName() + " )";
// Not an error if res1.size() == 0: will look for a DA // Not an error if res1.size() == 0: will look for a DA
if( res1.size() > 1 ) { if( res1.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess1 + " using ParentDOI" ); console.warning( messagePrefix, "found several ", mess1, " using ParentDOI" );
return; return;
} }
if( res1.size() == 1 ) { if( res1.size() == 1 ) {
setRefersToSDO( res1.get( 0 )); setRefersToSDO( res1.get( 0 ));
console.info( "[SCL links] SDI on line " + getLineNumber() + " refers to " + mess1 + " on line " + getRefersToSDO().getLineNumber() ); console.info( "[SCL links] SDI on line ", getLineNumber(), " refers to ", mess1, " on line ", getRefersToSDO().getLineNumber() );
return; return;
} }
...@@ -1030,27 +1030,27 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1030,27 +1030,27 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess2 = "DA( name = " + getName() + " )"; String mess2 = "DA( name = " + getName() + " )";
// Specific message if res2.size() == 0 // Specific message if res2.size() == 0
if( res2.size() == 0 ) { if( res2.size() == 0 ) {
console.warning( messagePrefix + "no SDO or DA found using ParentDOI" ); console.warning( messagePrefix, "no SDO or DA found using ParentDOI" );
return; return;
} }
if( res2.size() > 1 ) { if( res2.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess2 + " using ParentDOI" ); console.warning( messagePrefix, "found several ", mess2, " using ParentDOI" );
return; return;
} }
setRefersToAbstractDataAttribute( res2.get( 0 )); setRefersToAbstractDataAttribute( res2.get( 0 ));
console.info( "[SCL links] SDI on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToAbstractDataAttribute().getLineNumber() ); console.info( "[SCL links] SDI on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToAbstractDataAttribute().getLineNumber() );
} }
private void doResolveLinkWithParentSDI( IRiseClipseConsole console, String messagePrefix ) { private void doResolveLinkWithParentSDI( IRiseClipseConsole console, String messagePrefix ) {
SDO sdo = getParentSDI().getRefersToSDO(); SDO sdo = getParentSDI().getRefersToSDO();
if( sdo != null ) { if( sdo != null ) {
console.verbose( messagePrefix + "found SDO on line " + sdo.getLineNumber() ); console.verbose( messagePrefix, "found SDO on line ", sdo.getLineNumber() );
sdo.buildExplicitLinks( console, false ); sdo.buildExplicitLinks( console, false );
DOType dot = sdo.getRefersToDOType(); DOType dot = sdo.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( dot == null ) return; if( dot == null ) return;
console.verbose( messagePrefix + "found DOType on line " + dot.getLineNumber() ); console.verbose( messagePrefix, "found DOType on line ", dot.getLineNumber() );
List< SDO > res1 = List< SDO > res1 =
dot dot
...@@ -1062,12 +1062,12 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1062,12 +1062,12 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess1 = "SDO( name = " + getName() + " )"; String mess1 = "SDO( name = " + getName() + " )";
// Not an error if res1.size() == 0: will look for a DA // Not an error if res1.size() == 0: will look for a DA
if( res1.size() > 1 ) { if( res1.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess1 + " using ParentSDI" ); console.warning( messagePrefix, "found several ", mess1, " using ParentSDI" );
return; return;
} }
if( res1.size() == 1 ) { if( res1.size() == 1 ) {
setRefersToSDO( res1.get( 0 )); setRefersToSDO( res1.get( 0 ));
console.info( "[SCL links] SDI on line " + getLineNumber() + " refers to " + mess1 + " on line " + getRefersToSDO().getLineNumber() ); console.info( "[SCL links] SDI on line ", getLineNumber(), " refers to ", mess1, " on line ", getRefersToSDO().getLineNumber() );
return; return;
} }
...@@ -1081,15 +1081,15 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1081,15 +1081,15 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess2 = "DA( name = " + getName() + " )"; String mess2 = "DA( name = " + getName() + " )";
// Specific message if res2.size() == 0 // Specific message if res2.size() == 0
if( res2.size() == 0 ) { if( res2.size() == 0 ) {
console.warning( messagePrefix + "no SDO or DA found using ParentSDI" ); console.warning( messagePrefix, "no SDO or DA found using ParentSDI" );
return; return;
} }
if( res2.size() > 1 ) { if( res2.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess2 + " using ParentSDI" ); console.warning( messagePrefix, "found several ", mess2, " using ParentSDI" );
return; return;
} }
setRefersToAbstractDataAttribute( res2.get( 0 )); setRefersToAbstractDataAttribute( res2.get( 0 ));
console.info( "[SCL links] SDI on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToAbstractDataAttribute().getLineNumber() ); console.info( "[SCL links] SDI on line ", getLineNumber(), " refers to ", mess2, " on line ", getRefersToAbstractDataAttribute().getLineNumber() );
return; return;
} }
...@@ -1097,16 +1097,16 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1097,16 +1097,16 @@ public class SDIImpl extends UnNamingImpl implements SDI {
// When getParentSDI().getRefersToSDO() == null // When getParentSDI().getRefersToSDO() == null
AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute(); AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute();
if( att == null ) { if( att == null ) {
console.warning( messagePrefix + "cannot find SDO or AbstractDataAttribute using ParentSDI" ); console.warning( messagePrefix, "cannot find SDO or AbstractDataAttribute using ParentSDI" );
return; return;
} }
console.verbose( messagePrefix + "found AbstractDataAttribute on line " + att.getLineNumber() ); console.verbose( messagePrefix, "found AbstractDataAttribute on line ", att.getLineNumber() );
att.buildExplicitLinks( console, false ); att.buildExplicitLinks( console, false );
DAType dat = att.getRefersToDAType(); DAType dat = att.getRefersToDAType();
// No error or warning message here: if this happens, error should have been detected before // No error or warning message here: if this happens, error should have been detected before
if( dat == null ) return; if( dat == null ) return;
console.verbose( messagePrefix + "found DAType on line " + dat.getLineNumber() ); console.verbose( messagePrefix, "found DAType on line ", dat.getLineNumber() );
List< BDA > res = List< BDA > res =
dat dat
...@@ -1121,7 +1121,7 @@ public class SDIImpl extends UnNamingImpl implements SDI { ...@@ -1121,7 +1121,7 @@ public class SDIImpl extends UnNamingImpl implements SDI {
return; return;
} }
setRefersToAbstractDataAttribute( res.get( 0 )); setRefersToAbstractDataAttribute( res.get( 0 ));
console.info( "[SCL links] SDI on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToAbstractDataAttribute().getLineNumber() ); console.info( "[SCL links] SDI on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToAbstractDataAttribute().