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

Method changeLanguage

static/panes/editor.ts:892–903  ·  view source on GitHub ↗
(newLang: string)

Source from the content-addressed store, hash-verified

890 }
891
892 changeLanguage(newLang: string): void {
893 if (!this.selectize) {
894 // In some initialization flows we get here before creating this.selectize
895 setTimeout(() => this.changeLanguage(newLang), 0);
896 } else {
897 if (newLang === 'cmake') {
898 const cmakeLang = languagesService.getLanguagesOrFail().cmake;
899 if (cmakeLang) this.selectize.addOption(cmakeLang);
900 }
901 this.selectize.setValue(newLang);
902 }
903 }
904
905 clearLinkedLine() {
906 this.decorations.linkedCode = [];

Callers 2

onCompilerOpenMethod · 0.95
updateTitleMethod · 0.95

Calls 1

getLanguagesOrFailMethod · 0.80

Tested by

no test coverage detected