Commit 4823f9f0 authored by Dominique Marcadet's avatar Dominique Marcadet

Check EnumType id

Error if EnumType id is not the same as NSD Enumeration name when it
should (same literals)
parent 21a912ef
......@@ -238,7 +238,16 @@ public class EnumerationValidator extends TypeValidator {
RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
0,
"[NSD validation] EnumType (id = " + enumType.getId() + ") at line " + enumType.getLineNumber()
+ " must use a different id because it extends or restricts the standard Enumeration",
+ " must use a different id because it extends or restricts the standard Enumeration " + getName(),
new Object[] { enumType } ));
}
else if( ! sameName && res ) {
diagnostics.add( new BasicDiagnostic(
Diagnostic.ERROR,
RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
0,
"[NSD validation] EnumType (id = " + enumType.getId() + ") at line " + enumType.getLineNumber()
+ " must use " + getName() + " as id because it is identical to the standard Enumeration",
new Object[] { enumType } ));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment