diff options
Diffstat (limited to 'subprojects/frontend/src/editor')
-rw-r--r-- | subprojects/frontend/src/editor/EditorStore.ts | 9 | ||||
-rw-r--r-- | subprojects/frontend/src/editor/GeneratedModelStore.ts | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts index d0b580ed..c5dd5728 100644 --- a/subprojects/frontend/src/editor/EditorStore.ts +++ b/subprojects/frontend/src/editor/EditorStore.ts | |||
@@ -36,7 +36,7 @@ import { | |||
36 | } from '../utils/fileIO'; | 36 | } from '../utils/fileIO'; |
37 | import getLogger from '../utils/getLogger'; | 37 | import getLogger from '../utils/getLogger'; |
38 | import type XtextClient from '../xtext/XtextClient'; | 38 | import type XtextClient from '../xtext/XtextClient'; |
39 | import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults'; | 39 | import type { SemanticsModelResult } from '../xtext/xtextServiceResults'; |
40 | 40 | ||
41 | import EditorErrors from './EditorErrors'; | 41 | import EditorErrors from './EditorErrors'; |
42 | import GeneratedModelStore from './GeneratedModelStore'; | 42 | import GeneratedModelStore from './GeneratedModelStore'; |
@@ -365,12 +365,11 @@ export default class EditorStore { | |||
365 | } | 365 | } |
366 | } | 366 | } |
367 | 367 | ||
368 | setSemanticsError(semanticsError: string) { | 368 | setSemanticsError(semanticsError: string | undefined) { |
369 | this.semanticsError = semanticsError; | 369 | this.semanticsError = semanticsError; |
370 | } | 370 | } |
371 | 371 | ||
372 | setSemantics(semantics: SemanticsSuccessResult) { | 372 | setSemantics(semantics: SemanticsModelResult) { |
373 | this.semanticsError = undefined; | ||
374 | this.graph.setSemantics(semantics); | 373 | this.graph.setSemantics(semantics); |
375 | } | 374 | } |
376 | 375 | ||
@@ -447,7 +446,7 @@ export default class EditorStore { | |||
447 | 446 | ||
448 | setGeneratedModelSemantics( | 447 | setGeneratedModelSemantics( |
449 | uuid: string, | 448 | uuid: string, |
450 | semantics: SemanticsSuccessResult, | 449 | semantics: SemanticsModelResult, |
451 | ): void { | 450 | ): void { |
452 | this.generatedModels.get(uuid)?.setSemantics(semantics); | 451 | this.generatedModels.get(uuid)?.setSemantics(semantics); |
453 | } | 452 | } |
diff --git a/subprojects/frontend/src/editor/GeneratedModelStore.ts b/subprojects/frontend/src/editor/GeneratedModelStore.ts index 4af49e2c..fb9efbcf 100644 --- a/subprojects/frontend/src/editor/GeneratedModelStore.ts +++ b/subprojects/frontend/src/editor/GeneratedModelStore.ts | |||
@@ -7,7 +7,7 @@ | |||
7 | import { makeAutoObservable } from 'mobx'; | 7 | import { makeAutoObservable } from 'mobx'; |
8 | 8 | ||
9 | import GraphStore from '../graph/GraphStore'; | 9 | import GraphStore from '../graph/GraphStore'; |
10 | import type { SemanticsSuccessResult } from '../xtext/xtextServiceResults'; | 10 | import type { SemanticsModelResult } from '../xtext/xtextServiceResults'; |
11 | 11 | ||
12 | import type EditorStore from './EditorStore'; | 12 | import type EditorStore from './EditorStore'; |
13 | 13 | ||
@@ -48,7 +48,7 @@ export default class GeneratedModelStore { | |||
48 | } | 48 | } |
49 | } | 49 | } |
50 | 50 | ||
51 | setSemantics(semantics: SemanticsSuccessResult): void { | 51 | setSemantics(semantics: SemanticsModelResult): void { |
52 | if (this.running) { | 52 | if (this.running) { |
53 | const name = `${this.editorStore.simpleNameOrFallback}_solution_${this.randomSeed}`; | 53 | const name = `${this.editorStore.simpleNameOrFallback}_solution_${this.randomSeed}`; |
54 | this.graph = new GraphStore(this.editorStore, name); | 54 | this.graph = new GraphStore(this.editorStore, name); |