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

Check EnumType id

Error if EnumType id is not the same as NSD Enumeration name when it
should (same literals)
parent 21a912ef
No related branches found
No related tags found
1 merge request!22Resolve "EnumType must not use a different id if it is identical to the NSD one"
......@@ -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 } ));
}
......
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