...
 
Commits (2)
......@@ -1401,13 +1401,13 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
String messagePrefix = "[SCL links] while resolving link from AbstractDataAttribute on line " + getLineNumber() + ": ";
if(( getType() == null ) || getType().isEmpty() ) {
console.warning( messagePrefix + "type is missing" );
console.warning( messagePrefix, "type is missing" );
return;
}
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" );
console.warning( messagePrefix, "DataTypeTemplates is missing" );
return;
}
......@@ -1428,7 +1428,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
return;
}
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() )) {
......@@ -1447,7 +1447,7 @@ public abstract class AbstractDataAttributeImpl extends UnNamingImpl implements
return;
}
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 {
String messagePrefix = "[SCL links] while resolving link from AnyLN on line " + getLineNumber() + ": ";
if(( getLnType() == null ) || getLnType().isEmpty() ) {
console.warning( messagePrefix + "lnType is missing" );
console.warning( messagePrefix, "lnType is missing" );
return;
}
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" );
console.warning( messagePrefix, "DataTypeTemplates is missing" );
return;
}
......@@ -1535,10 +1535,10 @@ public abstract class AnyLNImpl extends UnNamingImpl implements AnyLN {
return;
}
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() )) {
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 {
String messagePrefix = "[SCL links] while resolving link from Association on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing " );
console.warning( messagePrefix, "iedName is missing " );
return;
}
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing " );
console.warning( messagePrefix, "ldInst is missing " );
return;
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing " );
console.warning( messagePrefix, "lnClass is missing " );
return;
}
......@@ -1199,7 +1199,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
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
// LDevice.name == Association.ldInst
......@@ -1209,7 +1209,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() );
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() );
String mess3 = "LN( lnClass = " + getLnClass();
......@@ -1223,7 +1223,7 @@ public class AssociationImpl extends BaseElementImpl implements Association {
return;
}
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
......@@ -1088,21 +1088,21 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
String messagePrefix = "[SCL links] while resolving link from ClientLN on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" );
console.warning( messagePrefix, "iedName is missing" );
return;
}
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" );
console.warning( messagePrefix, "ldInst is missing" );
return;
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" );
console.warning( messagePrefix, "lnClass is missing" );
return;
}
// 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() )) {
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;
}
......@@ -1114,16 +1114,16 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
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;
if(( getApRef() == null ) || getApRef().isEmpty() ) {
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;
}
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;
}
ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 );
......@@ -1135,7 +1135,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() );
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() );
......@@ -1144,7 +1144,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3, lDevice.getRight() );
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() );
String mess4 = "LN( lnClass = " + getLnClass();
......@@ -1158,7 +1158,7 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
return;
}
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
......@@ -986,11 +986,11 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
String messagePrefix = "[SCL links] while resolving link from ConnectedAP on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" );
console.warning( messagePrefix, "iedName is missing" );
return;
}
if(( getApName() == null ) || getApName().isEmpty() ) {
console.warning( messagePrefix + "apName is missing" );
console.warning( messagePrefix, "apName is missing" );
return;
}
......@@ -1002,7 +1002,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
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() );
String mess2 = "AccessPoint( name = " + getApName() + " )";
if( ap.getLeft() == null ) {
......@@ -1010,7 +1010,7 @@ public class ConnectedAPImpl extends UnNamingImpl implements ConnectedAP {
return;
}
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
......@@ -657,11 +657,11 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
String messagePrefix = "[SCL links] while resolving link from ControlBlock on line " + getLineNumber() + ": ";
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" );
console.warning( messagePrefix, "ldInst is missing" );
return;
}
if(( getCbName() == null ) || getCbName().isEmpty() ) {
console.warning( messagePrefix + "cbName is missing" );
console.warning( messagePrefix, "cbName is missing" );
return;
}
......@@ -679,12 +679,12 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
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
// ControlWithIEDName.name == ControlBlock.bName
if( lDevice.getLeft().getLN0() == null ) {
console.warning( messagePrefix + "LN0 is missing" );
console.warning( messagePrefix, "LN0 is missing" );
return;
}
......@@ -704,7 +704,7 @@ public abstract class ControlBlockImpl extends UnNamingImpl implements ControlBl
return;
}
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
......@@ -576,7 +576,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control {
String messagePrefix = "[SCL links] while resolving link from Control on line " + getLineNumber() + ": ";
if(( getDatSet() == null ) || getDatSet().isEmpty() ) {
console.warning( messagePrefix + "datSet is missing" );
console.warning( messagePrefix, "datSet is missing" );
return;
}
......@@ -598,7 +598,7 @@ public abstract class ControlImpl extends UnNamingImpl implements Control {
return;
}
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
......@@ -966,7 +966,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
String messagePrefix = "[SCL links] while resolving link from DAI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" );
console.warning( messagePrefix, "name is missing" );
return;
}
......@@ -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
DO do_ = getParentDOI().getRefersToDO();
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 );
DOType dot = do_.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before
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 =
dot
......@@ -1006,7 +1006,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
return;
}
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 ) {
......@@ -1014,12 +1014,12 @@ public class DAIImpl extends UnNamingImpl implements DAI {
AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute();
if( att == null ) return;
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();
// No error or warning message here: if this happens, error should have been detected before
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 =
dat
......@@ -1034,7 +1034,7 @@ public class DAIImpl extends UnNamingImpl implements DAI {
return;
}
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
......@@ -835,14 +835,14 @@ public class DOIImpl extends UnNamingImpl implements DOI {
String messagePrefix = "[SCL links] while resolving link from DOI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" );
console.warning( messagePrefix, "name is missing" );
return;
}
// No error or warning message here: if this happens, error should have been detected before
if( getParentAnyLN() == 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 =
getParentAnyLN()
......@@ -858,7 +858,7 @@ public class DOIImpl extends UnNamingImpl implements DOI {
return;
}
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
......@@ -492,7 +492,7 @@ public class DOImpl extends AbstractDataObjectImpl implements DO {
String messagePrefix = "[SCL links] while resolving link from DO on line " + getLineNumber() + ": ";
if(( getType() == null ) || getType().isEmpty() ) {
console.warning( messagePrefix + "type is missing" );
console.warning( messagePrefix, "type is missing" );
return;
}
// 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 {
return;
}
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
......@@ -2456,13 +2456,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
if(( getIedName() == null ) || getIedName().isEmpty() ) {
// 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 );
}
if(( getDoName() == null ) || getDoName().isEmpty() ) {
// No link if no doName
console.verbose( messagePrefix + "doName is absent" );
console.verbose( messagePrefix, "doName is absent" );
return Pair.of( null, null );
}
......@@ -2477,15 +2477,15 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, "IED( name = " + getIedName() + " )", ied.getRight() );
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
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" );
console.warning( messagePrefix, "ldInst is missing" );
return Pair.of( ied.getLeft(), null );
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" );
console.warning( messagePrefix, "lnClass is missing" );
return Pair.of( ied.getLeft(), null );
}
......@@ -2495,7 +2495,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
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() );
......@@ -2510,12 +2510,12 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
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 );
// No error or warning message here: if this happens, error should have been detected before
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
// The first doName let us find the DO inside the LNodeType
......@@ -2541,13 +2541,13 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
}
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 );
for( int i = 1; i < doNames.length; ++i ) {
DOType doType = ado.getRefersToDOType();
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];
List< SDO > res3b =
doType
......@@ -2562,21 +2562,21 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes;
}
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 );
}
// Set link to DO/SDO only if no daName
if( getDaName() == null ) {
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;
}
DOType doType = ado.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before
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
// If daName is structured, find the DAType and its BDA using remaining daName
......@@ -2595,7 +2595,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes;
}
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 ) {
da.buildExplicitLinks( console, false );
......@@ -2615,10 +2615,10 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return finalRes;
}
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 );
return finalRes;
......@@ -2640,7 +2640,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
if( ied == null ) return;
if(( getSrcCBName() == null ) || getSrcCBName().isEmpty() ) {
console.verbose( messagePrefix + "srcCBName is absent" );
console.verbose( messagePrefix, "srcCBName is absent" );
return;
}
......@@ -2652,7 +2652,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return;
}
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;
......@@ -2671,7 +2671,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess6, anyLN.getRight() );
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 >();
listControls.addAll( anyLN.getLeft().getLogControl() );
......@@ -2681,7 +2681,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
listControls.addAll( lDevice.getLN0().getSampledValueControl() );
}
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;
}
......@@ -2696,7 +2696,7 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
return;
}
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
......@@ -1065,15 +1065,15 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
String messagePrefix = "[SCL links] while resolving link from FCDA on line " + getLineNumber() + ": ";
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
console.warning( messagePrefix + "ldInst is missing" );
console.warning( messagePrefix, "ldInst is missing" );
return;
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" );
console.warning( messagePrefix, "lnClass is missing" );
return;
}
if(( getDoName() == null ) || getDoName().isEmpty() ) {
console.warning( messagePrefix + "doName is missing" );
console.warning( messagePrefix, "doName is missing" );
return;
}
......@@ -1083,11 +1083,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
object = object.eContainer();
}
if( object == null ) {
console.warning( messagePrefix + "AccessPoint not found" );
console.warning( messagePrefix, "AccessPoint not found" );
return;
}
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() );
String mess1 = "LDevice( inst = " + getLdInst() + " )";
......@@ -1095,7 +1095,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, lDevice.getRight() );
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() );
String mess2 = "LN( lnClass = " + getLnClass();
......@@ -1108,11 +1108,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
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 );
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
// The first doName let us find the DO inside the LNodeType
......@@ -1136,13 +1136,13 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3a, res3a.size() );
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 );
DOType doType = res3a.get( 0 ).getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before
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 ) {
String name = doNames[i];
......@@ -1158,12 +1158,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3b, res3b.size() );
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 );
doType = res3b.get( 0 ).getRefersToDOType();
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 ) {
......@@ -1184,7 +1184,7 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
return;
}
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 ) {
da.buildExplicitLinks( console, false );
......@@ -1204,12 +1204,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
return;
}
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: 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 );
}
......@@ -1225,11 +1225,11 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
if( getRefersToAbstractDataAttribute().size() > 0 ) {
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 {
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 {
String messagePrefix = "[SCL links] while resolving link from IEDName on line " + getLineNumber() + ": ";
if(( getValue() == null ) || getValue().isEmpty() ) {
console.warning( messagePrefix + "value is missing" );
console.warning( messagePrefix, "value is missing" );
return;
}
......@@ -1216,20 +1216,20 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
if(( getLdInst() == null ) || getLdInst().isEmpty() ) {
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;
}
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;
if(( getApRef() == null ) || getApRef().isEmpty() ) {
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;
}
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;
}
ap = Pair.of( ied.getLeft().getAccessPoint().get( 0 ), 1 );
......@@ -1241,7 +1241,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, ap.getRight() );
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() );
String mess3 = "LDevice( inst = " + getLdInst() + " )";
......@@ -1251,10 +1251,10 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
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;
}
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() );
String mess4 = "LN( lnClass = " + getLnClass();
......@@ -1268,7 +1268,7 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
return;
}
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
......@@ -552,11 +552,11 @@ public class KDCImpl extends SclObjectImpl implements KDC {
String messagePrefix = "[SCL links] while resolving link from KDC on line " + getLineNumber() + ": ";
if(( getIedName() == null ) || getIedName().isEmpty() ) {
console.warning( messagePrefix + "iedName is missing" );
console.warning( messagePrefix, "iedName is missing" );
return;
}
if(( getApName() == null ) || getApName().isEmpty() ) {
console.warning( messagePrefix + "apName is missing" );
console.warning( messagePrefix, "apName is missing" );
return;
}
......@@ -568,7 +568,7 @@ public class KDCImpl extends SclObjectImpl implements KDC {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
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() );
String mess2 = "AccessPoint( name = " + getApName() + " )";
......@@ -577,7 +577,7 @@ public class KDCImpl extends SclObjectImpl implements KDC {
return;
}
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
......@@ -1079,12 +1079,12 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
// Resolve only if attribute is not None
// Default value is None
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;
}
if(( getLnClass() == null ) || getLnClass().isEmpty() ) {
console.warning( messagePrefix + "lnClass is missing" );
console.warning( messagePrefix, "lnClass is missing" );
return;
}
......@@ -1096,7 +1096,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess1, ied.getRight() );
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
// LDevice.name == LNode.ldInst
......@@ -1106,7 +1106,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, lDevice.getRight() );
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
// LN.lnClass == LNode.lnClass
......@@ -1124,7 +1124,7 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
return;
}
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 ) {
......@@ -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.
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;
}
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" );
console.warning( messagePrefix, "DataTypeTemplates is missing" );
return;
}
......@@ -1156,10 +1156,10 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
return;
}
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() )) {
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
String messagePrefix = "[SCL links] while resolving link from LogControl on line " + getLineNumber() + ": ";
if(( getLogName() == null ) || getLogName().isEmpty() ) {
console.warning( messagePrefix + "logName is missing" );
console.warning( messagePrefix, "logName is missing" );
return;
}
......@@ -1273,7 +1273,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
return;
}
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() );
......@@ -1288,7 +1288,7 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
return;
}
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 {
String messagePrefix = "[SCL links] while resolving link from SDI on line " + getLineNumber() + ": ";
if(( getName() == null ) || getName().isEmpty() ) {
console.warning( messagePrefix + "name is missing" );
console.warning( messagePrefix, "name is missing" );
return;
}
......@@ -993,13 +993,13 @@ public class SDIImpl extends UnNamingImpl implements SDI {
DO do_ = getParentDOI().getRefersToDO();
// No error or warning message here: if this happens, error should have been detected before
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 );
DOType dot = do_.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before
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 =
dot
......@@ -1011,12 +1011,12 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess1 = "SDO( name = " + getName() + " )";
// Not an error if res1.size() == 0: will look for a DA
if( res1.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess1 + " using ParentDOI" );
console.warning( messagePrefix, "found several ", mess1, " using ParentDOI" );
return;
}
if( res1.size() == 1 ) {
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;
}
......@@ -1030,27 +1030,27 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess2 = "DA( name = " + getName() + " )";
// Specific message 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;
}
if( res2.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess2 + " using ParentDOI" );
console.warning( messagePrefix, "found several ", mess2, " using ParentDOI" );
return;
}
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 ) {
SDO sdo = getParentSDI().getRefersToSDO();
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 );
DOType dot = sdo.getRefersToDOType();
// No error or warning message here: if this happens, error should have been detected before
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 =
dot
......@@ -1062,12 +1062,12 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess1 = "SDO( name = " + getName() + " )";
// Not an error if res1.size() == 0: will look for a DA
if( res1.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess1 + " using ParentSDI" );
console.warning( messagePrefix, "found several ", mess1, " using ParentSDI" );
return;
}
if( res1.size() == 1 ) {
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;
}
......@@ -1081,15 +1081,15 @@ public class SDIImpl extends UnNamingImpl implements SDI {
String mess2 = "DA( name = " + getName() + " )";
// Specific message 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;
}
if( res2.size() > 1 ) {
console.warning( messagePrefix + "found several " + mess2 + " using ParentSDI" );
console.warning( messagePrefix, "found several ", mess2, " using ParentSDI" );
return;
}
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;
}
......@@ -1097,16 +1097,16 @@ public class SDIImpl extends UnNamingImpl implements SDI {
// When getParentSDI().getRefersToSDO() == null
AbstractDataAttribute att = getParentSDI().getRefersToAbstractDataAttribute();
if( att == null ) {
console.warning( messagePrefix + "cannot find SDO or AbstractDataAttribute using ParentSDI" );
console.warning( messagePrefix, "cannot find SDO or AbstractDataAttribute using ParentSDI" );
return;
}
console.verbose( messagePrefix + "found AbstractDataAttribute on line " + att.getLineNumber() );
console.verbose( messagePrefix, "found AbstractDataAttribute on line ", att.getLineNumber() );
att.buildExplicitLinks( console, false );
DAType dat = att.getRefersToDAType();
// No error or warning message here: if this happens, error should have been detected before
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 =
dat
......@@ -1121,7 +1121,7 @@ public class SDIImpl extends UnNamingImpl implements SDI {
return;
}
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().getLineNumber() );
}
} //SDIImpl
......@@ -399,12 +399,12 @@ public class SDOImpl extends AbstractDataObjectImpl implements SDO {
String messagePrefix = "[SCL links] while resolving link from SDO on line " + getLineNumber() + ": ";
if(( getType() == null ) || getType().isEmpty() ) {
console.warning( messagePrefix + "type is missing" );
console.warning( messagePrefix, "type is missing" );
return;
}
DataTypeTemplates dtt = SclUtilities.getSCL( this ).getDataTypeTemplates();
if( dtt == null ) {
console.warning( messagePrefix + "DataTypeTemplates is missing" );
console.warning( messagePrefix, "DataTypeTemplates is missing" );
return;
}
......@@ -421,7 +421,7 @@ public class SDOImpl extends AbstractDataObjectImpl implements SDO {
return;
}
setRefersToDOType( res.get( 0 ) );
console.info( "[SCL links] SDO on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToDOType().getLineNumber() );
console.info( "[SCL links] SDO on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToDOType().getLineNumber() );
}
} //SDOImpl
......@@ -460,7 +460,7 @@ public class ServerAtImpl extends UnNamingImpl implements ServerAt {
String messagePrefix = "[SCL links] while resolving link from ServerAt on line " + getLineNumber() + ": ";
if(( getApName() == null ) || getApName().isEmpty() ) {
console.warning( messagePrefix + "apName is missing" );
console.warning( messagePrefix, "apName is missing" );
return;
}
......@@ -475,7 +475,7 @@ public class ServerAtImpl extends UnNamingImpl implements ServerAt {
return;
}
setRefersToAccessPoint( ap.getLeft() );
console.info( "[SCL links] ServerAt on line " + getLineNumber() + " refers to " + mess + " on line " + getRefersToAccessPoint().getLineNumber() );
console.info( "[SCL links] ServerAt on line ", getLineNumber(), " refers to ", mess, " on line ", getRefersToAccessPoint().getLineNumber() );
}
} //ServerAtImpl
......@@ -1134,15 +1134,15 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
// neutralPoint If true, this terminal connects to a neutral (star) point of all power transformer windings. Default value is false.
if(( getCNodeName() == null ) || getCNodeName().isEmpty() ) {
console.warning( messagePrefix + "cNodeName is missing" );
console.warning( messagePrefix, "cNodeName is missing" );
return;
}
if(( getVoltageLevelName() == null ) || getVoltageLevelName().isEmpty() ) {
console.warning( messagePrefix + "voltageLevelName is missing" );
console.warning( messagePrefix, "voltageLevelName is missing" );
return;
}
if(( getBayName() == null ) || getBayName().isEmpty() ) {
console.warning( messagePrefix + "bayName is missing" );
console.warning( messagePrefix, "bayName is missing" );
return;
}
......@@ -1162,7 +1162,7 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
Substation substation = res1.get( 0 );
console.verbose( messagePrefix + "found " + mess1 + " on line " + substation.getLineNumber() );
console.verbose( messagePrefix, "found ", mess1, " on line ", substation.getLineNumber() );
// find a VoltageLevel with
// VoltageLevel.name == Terminal.voltageLevelName
......@@ -1179,7 +1179,7 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
VoltageLevel voltageLevel = res2.get( 0 );
console.verbose( messagePrefix + "found " + mess2 + " on line " + voltageLevel.getLineNumber() );
console.verbose( messagePrefix, "found ", mess2, " on line ", voltageLevel.getLineNumber() );
// find a Bay with
// Bay.name == Terminal.bayName
......@@ -1196,7 +1196,7 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
Bay bay = res3.get( 0 );
console.verbose( messagePrefix + "found " + mess3 + " on line " + voltageLevel.getLineNumber() );
console.verbose( messagePrefix, "found ", mess3, " on line ", voltageLevel.getLineNumber() );
// find a ConnectivityNode with
// ConnectivityNode.name == Terminal.bayName
......@@ -1213,12 +1213,12 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
setRefersToConnectivityNode( res4.get( 0 ));
console.info( "[SCL links] Terminal on line " + getLineNumber() + " refers to " + mess4 + " on line " + getRefersToConnectivityNode().getLineNumber() );
console.info( "[SCL links] Terminal on line ", getLineNumber(), " refers to ", mess4, " on line ", getRefersToConnectivityNode().getLineNumber() );
}
private void doBuildExplicitLinkWithLine( IRiseClipseConsole console, String messagePrefix ) {
if(( getCNodeName() == null ) || getCNodeName().isEmpty() ) {
console.warning( messagePrefix + "cNodeName is missing" );
console.warning( messagePrefix, "cNodeName is missing" );
return;
}
......@@ -1238,7 +1238,7 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
Line line = res1.get( 0 );
console.verbose( messagePrefix + "found " + mess1 + " on line " + line.getLineNumber() );
console.verbose( messagePrefix, "found ", mess1, " on line ", line.getLineNumber() );
// find a ConnectivityNode with
// ConnectivityNode.name == Terminal.bayName
......@@ -1255,7 +1255,7 @@ public class TerminalImpl extends UnNamingImpl implements Terminal {
return;
}
setRefersToConnectivityNode( res2.get( 0 ));
console.info( "[SCL links] Terminal on line " + getLineNumber() + " refers to " + mess2 + " on line " + getRefersToConnectivityNode().getLineNumber() );
console.info( "[SCL links] Terminal on line ", getLineNumber(), " refers to ", mess2 + " on line ", getRefersToConnectivityNode().getLineNumber() );
}
} //TerminalImpl
......@@ -138,7 +138,7 @@ public class SclUtilities {
}
public static void displayNotFoundWarning( IRiseClipseConsole console, String prefix, String suffix, int nb ) {
console.warning( prefix + (( nb == 0 ) ? "cannot find " : "found several " ) + suffix );
console.warning( prefix, (( nb == 0 ) ? "cannot find " : "found several " ), suffix );
}
}