MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / editFile

Method editFile

static/panes/tree.ts:417–432  ·  view source on GitHub ↗
(fileId: number)

Source from the content-addressed store, hash-verified

415 }
416
417 private editFile(fileId: number) {
418 const file = this.multifileService.getFileByFileId(fileId);
419 if (file) {
420 if (!file.isOpen) {
421 const dragConfig = this.getConfigForNewEditor(file);
422 file.isOpen = true;
423
424 this.hub.addInEditorStackIfPossible(dragConfig);
425 } else {
426 const editor = this.hub.getEditorById(file.editorId);
427 this.hub.activateTabForContainer(editor?.container);
428 }
429
430 this.sendChangesToAllEditors();
431 }
432 }
433
434 private async moveToInclude(fileId: number) {
435 await this.multifileService.includeByFileId(fileId);

Callers 2

addRowToTreelistMethod · 0.95
openZipFileMethod · 0.95

Calls 6

getConfigForNewEditorMethod · 0.95
getFileByFileIdMethod · 0.80
getEditorByIdMethod · 0.80

Tested by

no test coverage detected