diff options
author | 2021-10-30 14:29:51 +0200 | |
---|---|---|
committer | 2021-10-31 19:26:13 +0100 | |
commit | 692cb2218b6684d1289660a0d97e644806c31cc5 (patch) | |
tree | 7a8f9565ff62dbdb7ebc328abb71ebcf9bb40877 /language-web/src/main/js/xtext/XtextClient.ts | |
parent | chore(web): refactor xtext client (diff) | |
download | refinery-692cb2218b6684d1289660a0d97e644806c31cc5.tar.gz refinery-692cb2218b6684d1289660a0d97e644806c31cc5.tar.zst refinery-692cb2218b6684d1289660a0d97e644806c31cc5.zip |
feat(web): server-side content assist filtering
Diffstat (limited to 'language-web/src/main/js/xtext/XtextClient.ts')
-rw-r--r-- | language-web/src/main/js/xtext/XtextClient.ts | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/language-web/src/main/js/xtext/XtextClient.ts b/language-web/src/main/js/xtext/XtextClient.ts index f8b06258..92bad0d3 100644 --- a/language-web/src/main/js/xtext/XtextClient.ts +++ b/language-web/src/main/js/xtext/XtextClient.ts | |||
@@ -14,23 +14,18 @@ import { XtextWebSocketClient } from './XtextWebSocketClient'; | |||
14 | const log = getLogger('xtext.XtextClient'); | 14 | const log = getLogger('xtext.XtextClient'); |
15 | 15 | ||
16 | export class XtextClient { | 16 | export class XtextClient { |
17 | webSocketClient: XtextWebSocketClient; | 17 | private webSocketClient: XtextWebSocketClient; |
18 | 18 | ||
19 | updateService: UpdateService; | 19 | private updateService: UpdateService; |
20 | 20 | ||
21 | contentAssistService: ContentAssistService; | 21 | private contentAssistService: ContentAssistService; |
22 | 22 | ||
23 | validationService: ValidationService; | 23 | private validationService: ValidationService; |
24 | 24 | ||
25 | constructor(store: EditorStore) { | 25 | constructor(store: EditorStore) { |
26 | this.webSocketClient = new XtextWebSocketClient( | 26 | this.webSocketClient = new XtextWebSocketClient( |
27 | async () => { | 27 | () => this.updateService.onConnect(), |
28 | this.updateService.xtextStateId = null; | 28 | (resource, stateId, service, push) => this.onPush(resource, stateId, service, push), |
29 | await this.updateService.updateFullText(); | ||
30 | }, | ||
31 | async (resource, stateId, service, push) => { | ||
32 | await this.onPush(resource, stateId, service, push); | ||
33 | }, | ||
34 | ); | 29 | ); |
35 | this.updateService = new UpdateService(store, this.webSocketClient); | 30 | this.updateService = new UpdateService(store, this.webSocketClient); |
36 | this.contentAssistService = new ContentAssistService(this.updateService); | 31 | this.contentAssistService = new ContentAssistService(this.updateService); |