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

Method updateEditorCode

static/panes/editor.ts:1939–1945  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1937
1938 // Called every time we change language, so we get the relevant code
1939 updateEditorCode(): void {
1940 const languages = languagesService.getLanguagesOrFail();
1941 this.setSource(
1942 this.editorSourceByLang[this.currentLanguage?.id ?? ''] ||
1943 languages[this.currentLanguage?.id ?? '']?.example,
1944 );
1945 }
1946
1947 override close(): void {
1948 this.eventHub.unsubscribe();

Callers 2

constructorMethod · 0.95
onLanguageChangeMethod · 0.95

Calls 2

setSourceMethod · 0.95
getLanguagesOrFailMethod · 0.80

Tested by

no test coverage detected