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

Method createToolView

static/panes/compiler.ts:2687–2709  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2685
2686 initToolButton(hideToolDropdown: () => void, button: JQuery<HTMLElement>, toolId: string): void {
2687 const createToolView = () => {
2688 let args = '';
2689 let monacoStdin = false;
2690 const langTools = toolsService.getCachedToolsForLang(this.currentLangId ?? '');
2691 const tool = langTools?.[toolId];
2692 if (tool) {
2693 if (tool.args !== undefined) {
2694 args = tool.args;
2695 }
2696 if (tool.monacoStdin !== undefined) {
2697 monacoStdin = !!tool.monacoStdin;
2698 }
2699 }
2700 return Components.getToolViewWith(
2701 this.id,
2702 this.getCompilerName(),
2703 this.sourceEditorId ?? 0,
2704 toolId,
2705 args,
2706 monacoStdin,
2707 this.sourceTreeId ?? 0,
2708 );
2709 };
2710
2711 createDragSource(this.container.layoutManager, button, () => createToolView()).on(
2712 'dragStart',

Callers

nothing calls this directly

Calls 2

getCompilerNameMethod · 0.95
getCachedToolsForLangMethod · 0.80

Tested by

no test coverage detected