Skip to content
Snippets Groups Projects
Commit d4cc7bc5 authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

display error if Val of DA lnNs is missing

parent 49f8313c
No related branches found
No related tags found
1 merge request!11Resolve "complete validation by NSD"
......@@ -112,24 +112,29 @@ public class NsdEObjectValidator implements EValidator {
.filter( d -> "lnNs".equals( d.getName() ))
.findAny();
if( da.isPresent() ) {
String value = " without value";
if( da.get().getVal().size() > 0 ) {
value = " with value [";
String value = "";
for( Val v : da.get().getVal() ) {
value += " " + v.getValue();
}
value += " ]";
diagnostics.add( new BasicDiagnostic(
Diagnostic.INFO,
RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
0,
"[NSD validation] LNodeType at line " + lNodeType.getLineNumber() + " with lnClass " + lNodeType.getLnClass()
+ " is specific because it has DA \"lnNs\" in DO \"NamPlt\" with value [" + value + " ]",
new Object[] { lNodeType } ));
return true;
}
diagnostics.add( new BasicDiagnostic(
Diagnostic.INFO,
Diagnostic.ERROR,
RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
0,
"[NSD validation] LNodeType at line " + lNodeType.getLineNumber() + " with lnClass " + lNodeType.getLnClass()
+ " is specific and has DA \"lnNs\" in DO \"NamPlt\"" + value,
+ " is specific because it has DA \"lnNs\" in DO \"NamPlt\" but value is missing",
new Object[] { lNodeType } ));
return true;
}
return false;
}
}
diagnostics.add( new BasicDiagnostic(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment