aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/js/xtext/XtextClient.ts
diff options
context:
space:
mode:
Diffstat (limited to 'language-web/src/main/js/xtext/XtextClient.ts')
-rw-r--r--language-web/src/main/js/xtext/XtextClient.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/language-web/src/main/js/xtext/XtextClient.ts b/language-web/src/main/js/xtext/XtextClient.ts
index 7683a8ef..ccb58ab4 100644
--- a/language-web/src/main/js/xtext/XtextClient.ts
+++ b/language-web/src/main/js/xtext/XtextClient.ts
@@ -6,6 +6,7 @@ import type { Transaction } from '@codemirror/state';
6 6
7import type { EditorStore } from '../editor/EditorStore'; 7import type { EditorStore } from '../editor/EditorStore';
8import { ContentAssistService } from './ContentAssistService'; 8import { ContentAssistService } from './ContentAssistService';
9import { HighlightingService } from './HighlightingService';
9import { UpdateService } from './UpdateService'; 10import { UpdateService } from './UpdateService';
10import { getLogger } from '../utils/logger'; 11import { getLogger } from '../utils/logger';
11import { ValidationService } from './ValidationService'; 12import { ValidationService } from './ValidationService';
@@ -20,6 +21,8 @@ export class XtextClient {
20 21
21 private contentAssistService: ContentAssistService; 22 private contentAssistService: ContentAssistService;
22 23
24 private highlightingService: HighlightingService;
25
23 private validationService: ValidationService; 26 private validationService: ValidationService;
24 27
25 constructor(store: EditorStore) { 28 constructor(store: EditorStore) {
@@ -29,6 +32,7 @@ export class XtextClient {
29 ); 32 );
30 this.updateService = new UpdateService(store, this.webSocketClient); 33 this.updateService = new UpdateService(store, this.webSocketClient);
31 this.contentAssistService = new ContentAssistService(this.updateService); 34 this.contentAssistService = new ContentAssistService(this.updateService);
35 this.highlightingService = new HighlightingService(store, this.updateService);
32 this.validationService = new ValidationService(store, this.updateService); 36 this.validationService = new ValidationService(store, this.updateService);
33 } 37 }
34 38
@@ -50,12 +54,12 @@ export class XtextClient {
50 await this.updateService.updateFullText(); 54 await this.updateService.updateFullText();
51 } 55 }
52 switch (service) { 56 switch (service) {
57 case 'highlight':
58 this.highlightingService.onPush(push);
59 return;
53 case 'validate': 60 case 'validate':
54 this.validationService.onPush(push); 61 this.validationService.onPush(push);
55 return; 62 return;
56 case 'highlight':
57 // TODO
58 return;
59 default: 63 default:
60 log.error('Unknown push service:', service); 64 log.error('Unknown push service:', service);
61 break; 65 break;