()
| 152 | } |
| 153 | |
| 154 | override registerCallbacks() { |
| 155 | super.registerCallbacks(); |
| 156 | this.eventHub.on('languageChange', this.onLanguageChange, this); |
| 157 | this.eventHub.on('toolInputChange', this.onToolInputChange, this); |
| 158 | this.eventHub.on('toolInputViewClosed', this.onToolInputViewClosed, this); |
| 159 | |
| 160 | this.toggleArgs.on('click', () => this.togglePanel(this.toggleArgs, this.panelArgs)); |
| 161 | |
| 162 | this.toggleStdin.on('click', () => { |
| 163 | if (!this.monacoStdin) { |
| 164 | this.togglePanel(this.toggleStdin, this.panelStdin); |
| 165 | } else { |
| 166 | if (!this.monacoEditorOpen) { |
| 167 | this.openMonacoEditor(); |
| 168 | } else { |
| 169 | this.monacoEditorOpen = false; |
| 170 | this.toggleStdin.removeClass('active'); |
| 171 | this.eventHub.emit('toolInputViewCloseRequest', this.compilerInfo.compilerId, this.toolId); |
| 172 | } |
| 173 | } |
| 174 | }); |
| 175 | |
| 176 | if ('MutationObserver' in window) { |
| 177 | new MutationObserver(this.resize.bind(this)).observe(this.localStdinField[0], { |
| 178 | attributes: true, |
| 179 | attributeFilter: ['style'], |
| 180 | }); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | async onLanguageChange(editorId: number | boolean, newLangId: LanguageKey) { |
| 185 | if (this.compilerInfo.editorId && this.compilerInfo.editorId === editorId) { |
nothing calls this directly
no test coverage detected