@@ -3,6 +3,7 @@ import { DisposableObject } from "../common/disposable-object";
33import type { AppEvent , AppEventEmitter } from "../common/events" ;
44import type { DatabaseItem } from "../databases/local-databases" ;
55import type { Method , Usage } from "./method" ;
6+ import type { ModelEvaluationRun } from "./model-evaluation-run" ;
67import type { ModeledMethod } from "./modeled-method" ;
78import type { Mode } from "./shared/mode" ;
89
@@ -55,6 +56,11 @@ interface ProcessedByAutoModelMethodsChangedEvent {
5556 readonly methods : ReadonlySet < string > ;
5657}
5758
59+ interface ModelEvaluationRunChangedEvent {
60+ readonly dbUri : string ;
61+ readonly evaluationRun : ModelEvaluationRun | undefined ;
62+ }
63+
5864interface RevealInModelEditorEvent {
5965 dbUri : string ;
6066 method : Method ;
@@ -76,6 +82,7 @@ export class ModelingEvents extends DisposableObject {
7682 public readonly onSelectedMethodChanged : AppEvent < SelectedMethodChangedEvent > ;
7783 public readonly onInProgressMethodsChanged : AppEvent < InProgressMethodsChangedEvent > ;
7884 public readonly onProcessedByAutoModelMethodsChanged : AppEvent < ProcessedByAutoModelMethodsChangedEvent > ;
85+ public readonly onModelEvaluationRunChanged : AppEvent < ModelEvaluationRunChangedEvent > ;
7986 public readonly onRevealInModelEditor : AppEvent < RevealInModelEditorEvent > ;
8087 public readonly onFocusModelEditor : AppEvent < FocusModelEditorEvent > ;
8188
@@ -90,6 +97,7 @@ export class ModelingEvents extends DisposableObject {
9097 private readonly onSelectedMethodChangedEventEmitter : AppEventEmitter < SelectedMethodChangedEvent > ;
9198 private readonly onInProgressMethodsChangedEventEmitter : AppEventEmitter < InProgressMethodsChangedEvent > ;
9299 private readonly onProcessedByAutoModelMethodsChangedEventEmitter : AppEventEmitter < ProcessedByAutoModelMethodsChangedEvent > ;
100+ private readonly onModelEvaluationRunChangedEventEmitter : AppEventEmitter < ModelEvaluationRunChangedEvent > ;
93101 private readonly onRevealInModelEditorEventEmitter : AppEventEmitter < RevealInModelEditorEvent > ;
94102 private readonly onFocusModelEditorEventEmitter : AppEventEmitter < FocusModelEditorEvent > ;
95103
@@ -155,6 +163,12 @@ export class ModelingEvents extends DisposableObject {
155163 this . onProcessedByAutoModelMethodsChanged =
156164 this . onProcessedByAutoModelMethodsChangedEventEmitter . event ;
157165
166+ this . onModelEvaluationRunChangedEventEmitter = this . push (
167+ app . createEventEmitter < ModelEvaluationRunChangedEvent > ( ) ,
168+ ) ;
169+ this . onModelEvaluationRunChanged =
170+ this . onModelEvaluationRunChangedEventEmitter . event ;
171+
158172 this . onRevealInModelEditorEventEmitter = this . push (
159173 app . createEventEmitter < RevealInModelEditorEvent > ( ) ,
160174 ) ;
@@ -273,6 +287,16 @@ export class ModelingEvents extends DisposableObject {
273287 } ) ;
274288 }
275289
290+ public fireModelEvaluationRunChangedEvent (
291+ dbUri : string ,
292+ evaluationRun : ModelEvaluationRun | undefined ,
293+ ) {
294+ this . onModelEvaluationRunChangedEventEmitter . fire ( {
295+ dbUri,
296+ evaluationRun,
297+ } ) ;
298+ }
299+
276300 public fireRevealInModelEditorEvent ( dbUri : string , method : Method ) {
277301 this . onRevealInModelEditorEventEmitter . fire ( {
278302 dbUri,
0 commit comments