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

Method onEditorChange

static/panes/executor.ts:770–790  ·  view source on GitHub ↗
(editor: number, source: string, langId: string, compilerId?: number)

Source from the content-addressed store, hash-verified

768 }
769
770 onEditorChange(editor: number, source: string, langId: string, compilerId?: number): void {
771 if (this.sourceTreeId) {
772 const tree = this.hub.getTreeById(this.sourceTreeId);
773 if (tree) {
774 if (tree.multifileService.isEditorPartOfProject(editor)) {
775 if (this.settings.compileOnChange) {
776 this.compile();
777
778 return;
779 }
780 }
781 }
782 }
783
784 if (editor === this.sourceEditorId && langId === this.currentLangId && compilerId === undefined) {
785 this.source = source;
786 if (this.settings.compileOnChange) {
787 this.compile();
788 }
789 }
790 }
791
792 initButtons(state: PaneState & ExecutorState): void {
793 this.outputContentRoot = this.domRoot.find('pre.content');

Callers

nothing calls this directly

Calls 3

compileMethod · 0.95
getTreeByIdMethod · 0.80
isEditorPartOfProjectMethod · 0.80

Tested by

no test coverage detected