diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-10-30 20:14:50 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 19:26:14 +0100 |
commit | cbf442d8fd9f72c567ebf9f036a219a9ff100487 (patch) | |
tree | a128345d9a9863bef7f3670da585bcb62d13cb34 /language-web/src/main/js/xtext/ValidationService.ts | |
parent | feat(web): show error count on generate button (diff) | |
download | refinery-cbf442d8fd9f72c567ebf9f036a219a9ff100487.tar.gz refinery-cbf442d8fd9f72c567ebf9f036a219a9ff100487.tar.zst refinery-cbf442d8fd9f72c567ebf9f036a219a9ff100487.zip |
feat(web): semantic highlighting
Diffstat (limited to 'language-web/src/main/js/xtext/ValidationService.ts')
-rw-r--r-- | language-web/src/main/js/xtext/ValidationService.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/language-web/src/main/js/xtext/ValidationService.ts b/language-web/src/main/js/xtext/ValidationService.ts index 163b5535..31c8f716 100644 --- a/language-web/src/main/js/xtext/ValidationService.ts +++ b/language-web/src/main/js/xtext/ValidationService.ts | |||
@@ -24,15 +24,20 @@ export class ValidationService { | |||
24 | } | 24 | } |
25 | const allChanges = this.updateService.computeChangesSinceLastUpdate(); | 25 | const allChanges = this.updateService.computeChangesSinceLastUpdate(); |
26 | const diagnostics: Diagnostic[] = []; | 26 | const diagnostics: Diagnostic[] = []; |
27 | push.issues.forEach((issue) => { | 27 | push.issues.forEach(({ |
28 | if (issue.severity === 'ignore') { | 28 | offset, |
29 | length, | ||
30 | severity, | ||
31 | description, | ||
32 | }) => { | ||
33 | if (severity === 'ignore') { | ||
29 | return; | 34 | return; |
30 | } | 35 | } |
31 | diagnostics.push({ | 36 | diagnostics.push({ |
32 | from: allChanges.mapPos(issue.offset), | 37 | from: allChanges.mapPos(offset), |
33 | to: allChanges.mapPos(issue.offset + issue.length), | 38 | to: allChanges.mapPos(offset + length), |
34 | severity: issue.severity, | 39 | severity, |
35 | message: issue.description, | 40 | message: description, |
36 | }); | 41 | }); |
37 | }); | 42 | }); |
38 | this.store.updateDiagnostics(diagnostics); | 43 | this.store.updateDiagnostics(diagnostics); |