MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / updateState

Method updateState

static/compiler-shared.ts:54–69  ·  view source on GitHub ↗
(state: CompilerState | ExecutorState)

Source from the content-addressed store, hash-verified

52 }
53
54 public updateState(state: CompilerState | ExecutorState) {
55 this.overridesWidget.setCompiler(state.compiler, state.lang);
56
57 if (state.overrides) {
58 this.overridesWidget.set(state.overrides);
59 }
60
61 if (this.runtimeToolsWidget) {
62 this.runtimeToolsWidget.setCompiler(state.compiler, state.lang);
63 if (state.runtimeTools) {
64 this.runtimeToolsWidget.set(state.runtimeTools);
65 } else {
66 this.runtimeToolsWidget.setDefaults();
67 }
68 }
69 }
70
71 private initButtons(onChange: () => void) {
72 this.overridesButton = this.domRoot.find('.btn.show-overrides');

Callers

nothing calls this directly

Calls 3

setDefaultsMethod · 0.80
setMethod · 0.65
setCompilerMethod · 0.45

Tested by

no test coverage detected