Commit b542db0a authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '56-update-for-using-variable-number-of-arguments-in-console-methods' into 'master'

Resolve "update for using variable number of arguments in console methods"

Closes #56

See merge request RiseClipseGroup/RiseClipseMetamodel_SCL2003!51
parents ba29ddce cab8cdf3
......@@ -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() );