MCPcopy Index your code
hub / github.com/compiler-explorer/compiler-explorer / setLanguage

Method setLanguage

static/panes/tool.ts:374–389  ·  view source on GitHub ↗
(languageId: false | string)

Source from the content-addressed store, hash-verified

372 }
373
374 setLanguage(languageId: false | string) {
375 if (languageId) {
376 this.options.enableToggle('wrap', false);
377 monaco.editor.setModelLanguage(unwrap(this.editor.getModel()), languageId);
378 this.editor.setValue('');
379 this.fontScale.setTarget(this.editor);
380 $(this.plainContentRoot).hide();
381 $(this.editorContentRoot).show();
382 } else {
383 this.options.enableToggle('wrap', true);
384 this.plainContentRoot.empty();
385 this.fontScale.setTarget('.content');
386 $(this.editorContentRoot).hide();
387 $(this.plainContentRoot).show();
388 }
389 }
390
391 clickableUrls(text: string) {
392 return text.replace(

Callers 1

onCompileResultMethod · 0.95

Calls 5

enableToggleMethod · 0.80
setTargetMethod · 0.80
unwrapFunction · 0.50
hideMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected