()
| 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', |
nothing calls this directly
no test coverage detected