* Delphi form code-behind: a form unit `UFRMAbout.pas` owns its visual form * definition `UFRMAbout.dfm` (VCL) / `.fmx` (FireMonkey) — paired by basename in * the same directory, wired by the `{$R *.dfm}` directive rather than a `uses` * clause. Link the unit → its form so a `.dfm`/`.fmx` used on
(ctx: ResolutionContext, onYield: MaybeYield)
| 3623 | * definition isn't orphaned, and editing the form surfaces its code-behind unit. |
| 3624 | */ |
| 3625 | async function pascalFormEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> { |
| 3626 | let scannedFiles = 0; |
| 3627 | const edges: Edge[] = []; |
| 3628 | const allFiles = new Set(ctx.getAllFiles()); |
| 3629 | for (const file of allFiles) { |
| 3630 | if ((++scannedFiles & 255) === 0) await onYield(); |
| 3631 | if (!/\.(dfm|fmx)$/i.test(file)) continue; |
| 3632 | const pasFile = file.replace(/\.(dfm|fmx)$/i, '.pas'); |
| 3633 | if (!allFiles.has(pasFile)) continue; |
| 3634 | const formNode = ctx.getNodesInFile(file).find((n) => n.kind === 'file'); |
| 3635 | const unitNode = ctx.getNodesInFile(pasFile).find((n) => n.kind === 'file'); |
| 3636 | if (!formNode || !unitNode) continue; |
| 3637 | edges.push({ |
| 3638 | source: unitNode.id, |
| 3639 | target: formNode.id, |
| 3640 | kind: 'references', |
| 3641 | line: unitNode.startLine, |
| 3642 | provenance: 'heuristic', |
| 3643 | metadata: { synthesizedBy: 'pascal-form', registeredAt: pasFile }, |
| 3644 | }); |
| 3645 | } |
| 3646 | return edges; |
| 3647 | } |
| 3648 | |
| 3649 | /** |
| 3650 | * SvelteKit file-convention data flow. A route directory's `+page.svelte` (a |
no test coverage detected