use of com.nedap.archie.adl14.ADL14Parser in project archetype-languageserver by nedap.
the class ADL14ConvertingStorage method addFile.
public void addFile(TextDocumentItem item) {
ADL14Parser adl14Parser = new ADL14Parser(BuiltinReferenceModels.getMetaModels());
Archetype archetype = null;
try {
archetype = adl14Parser.parse(item.getText(), configuration);
textService.pushDiagnostics(new VersionedTextDocumentIdentifier(item.getUri(), item.getVersion()), null, new ValidationResult(archetype));
adl14Files.put(item.getUri(), archetype);
} catch (ADLParseException ex) {
textService.pushDiagnostics(new VersionedTextDocumentIdentifier(item.getUri(), item.getVersion()), ex.getErrors());
}
}
Aggregations