Open kittaakos opened 6 years ago
Maybe it does not make much sense to run the model processor and validator when we have any syntax errors. Adding a guard to model processor or to the ResourceValidator
would solve the problem:
if (resource.getErrors().stream().anyMatch(diagnostic -> diagnostic instanceof XtextSyntaxDiagnostic)) {
return;
}
This is related to a current issue being discussed with the business users. There is a request that syntax errors be ignored if they do not affect any requirements. That seems an odd test, but the .sadl files are created automatically from another source and if a syntax error in a .sadl file did not result in an ontology (.owl file) that caused any errors in .sreq or .sver files, one could conceivably "ignore" the errors. That would entail running the model processor, as now happens, and the saving of whatever is generated, if there is valid content, in a .owl file, which does not currently happen. It's possible that there could be a preference to control this to get either extreme behavior.
I got errors on the
additional_grammar_changes
branch with the following broken model:Error: