diff options
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r-- | subprojects/frontend/src/editor/EditorStore.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts index 10f01099..b5989ad1 100644 --- a/subprojects/frontend/src/editor/EditorStore.ts +++ b/subprojects/frontend/src/editor/EditorStore.ts | |||
@@ -26,6 +26,7 @@ import { makeAutoObservable, observable, runInAction } from 'mobx'; | |||
26 | import { nanoid } from 'nanoid'; | 26 | import { nanoid } from 'nanoid'; |
27 | 27 | ||
28 | import type PWAStore from '../PWAStore'; | 28 | import type PWAStore from '../PWAStore'; |
29 | import GraphStore from '../graph/GraphStore'; | ||
29 | import getLogger from '../utils/getLogger'; | 30 | import getLogger from '../utils/getLogger'; |
30 | import type XtextClient from '../xtext/XtextClient'; | 31 | import type XtextClient from '../xtext/XtextClient'; |
31 | import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults'; | 32 | import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults'; |
@@ -66,7 +67,7 @@ export default class EditorStore { | |||
66 | 67 | ||
67 | semanticsError: string | undefined; | 68 | semanticsError: string | undefined; |
68 | 69 | ||
69 | semantics: SemanticsSuccessResult | undefined; | 70 | graph: GraphStore; |
70 | 71 | ||
71 | constructor(initialValue: string, pwaStore: PWAStore) { | 72 | constructor(initialValue: string, pwaStore: PWAStore) { |
72 | this.id = nanoid(); | 73 | this.id = nanoid(); |
@@ -86,12 +87,12 @@ export default class EditorStore { | |||
86 | })().catch((error) => { | 87 | })().catch((error) => { |
87 | log.error('Failed to load XtextClient', error); | 88 | log.error('Failed to load XtextClient', error); |
88 | }); | 89 | }); |
90 | this.graph = new GraphStore(); | ||
89 | makeAutoObservable<EditorStore, 'client'>(this, { | 91 | makeAutoObservable<EditorStore, 'client'>(this, { |
90 | id: false, | 92 | id: false, |
91 | state: observable.ref, | 93 | state: observable.ref, |
92 | client: observable.ref, | 94 | client: observable.ref, |
93 | view: observable.ref, | 95 | view: observable.ref, |
94 | semantics: observable.ref, | ||
95 | searchPanel: false, | 96 | searchPanel: false, |
96 | lintPanel: false, | 97 | lintPanel: false, |
97 | contentAssist: false, | 98 | contentAssist: false, |
@@ -298,7 +299,7 @@ export default class EditorStore { | |||
298 | 299 | ||
299 | setSemantics(semantics: SemanticsSuccessResult) { | 300 | setSemantics(semantics: SemanticsSuccessResult) { |
300 | this.semanticsError = undefined; | 301 | this.semanticsError = undefined; |
301 | this.semantics = semantics; | 302 | this.graph.setSemantics(semantics); |
302 | } | 303 | } |
303 | 304 | ||
304 | dispose(): void { | 305 | dispose(): void { |