(hub: Hub, container: Container, state: PaneState & ExecutorState)
| 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); |
nothing calls this directly
no test coverage detected