MCPcopy Index your code
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

static/panes/executor.ts:136–175  ·  view source on GitHub ↗
(hub: Hub, container: Container, state: PaneState & ExecutorState)

Source from the content-addressed store, hash-verified

134 private artifactHandler: ArtifactHandler;
135
136 constructor(hub: Hub, container: Container, state: PaneState & ExecutorState) {
137 super(hub, container, state);
138 if (this.sourceTreeId) {
139 this.sourceEditorId = null;
140 } else {
141 this.sourceEditorId = state.source || 1;
142 }
143 this.id = state.id || this.hub.nextExecutorId();
144
145 this.contentRoot = this.domRoot.find('.content');
146 this.infoByLang = {};
147 this.deferCompiles = true;
148 this.needsCompile = false;
149 this.source = '';
150 this.lastResult = {code: -1, timedOut: false, stdout: [], stderr: []};
151 this.lastTimeTaken = 0;
152 this.pendingRequestSentAt = 0;
153 this.pendingCMakeRequestSentAt = 0;
154 this.nextRequest = null;
155 this.nextCMakeRequest = null;
156
157 this.alertSystem = new Alert();
158 this.alertSystem.prefixMessage = 'Executor #' + this.id;
159 this.artifactHandler = new ArtifactHandler(this.alertSystem);
160
161 this.normalAnsiToHtml = makeAnsiToHtml();
162 this.errorAnsiToHtml = makeAnsiToHtml('var(--terminal-red)');
163
164 this.initButtons(state);
165
166 this.fontScale = new FontScale(this.domRoot, state, 'pre.content');
167
168 this.compilerShared = new CompilerShared(this.domRoot, this.onCompilerOverridesChange.bind(this));
169 this.compilerShared.updateState(state);
170 this.initCallbacks();
171 // Handle initial settings
172 this.onSettingsChange(this.settings);
173
174 this.postInit(state);
175 }
176
177 private async postInit(state: PaneState & ExecutorState) {
178 await this.initLangAndCompiler(state);

Callers

nothing calls this directly

Calls 8

initButtonsMethod · 0.95
initCallbacksMethod · 0.95
onSettingsChangeMethod · 0.95
postInitMethod · 0.95
nextExecutorIdMethod · 0.80
findMethod · 0.80
makeAnsiToHtmlFunction · 0.70
updateStateMethod · 0.65

Tested by

no test coverage detected