Render one symbol: details + (optional) body/outline + its caller/callee trail.
(cg: CodeGraph, node: Node, includeCode: boolean)
| 3886 | |
| 3887 | /** Render one symbol: details + (optional) body/outline + its caller/callee trail. */ |
| 3888 | private async renderNodeSection(cg: CodeGraph, node: Node, includeCode: boolean): Promise<string> { |
| 3889 | let code: string | null = null; |
| 3890 | let outline: string | null = null; |
| 3891 | if (includeCode) { |
| 3892 | // For container symbols (class/interface/struct/…), the full body is the |
| 3893 | // sum of every method body — a wall of source. Return a structural outline |
| 3894 | // (members + signatures + line numbers) instead; leaf symbols return their |
| 3895 | // full body. |
| 3896 | if (CONTAINER_NODE_KINDS.has(node.kind)) { |
| 3897 | outline = this.buildContainerOutline(cg, node); |
| 3898 | } |
| 3899 | if (!outline) { |
| 3900 | code = await cg.getCode(node.id); |
| 3901 | } |
| 3902 | } |
| 3903 | return this.formatNodeDetails(node, code, outline) + this.formatTrail(cg, node); |
| 3904 | } |
| 3905 | |
| 3906 | /** |
| 3907 | * Build the "trail" for a symbol: its direct callees (what it calls) and |
no test coverage detected