* 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)
| 3602 | * definition isn't orphaned, and editing the form surfaces its code-behind unit. |
| 3603 | */ |
| 3604 | async function pascalFormEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> { |
| 3605 | let scannedFiles = 0; |
| 3606 | const edges: Edge[] = []; |
| 3607 | const allFiles = new Set(ctx.getAllFiles()); |
| 3608 | for (const file of allFiles) { |
| 3609 | if ((++scannedFiles & 255) === 0) await onYield(); |
| 3610 | if (!/\.(dfm|fmx)$/i.test(file)) continue; |
| 3611 | const pasFile = file.replace(/\.(dfm|fmx)$/i, '.pas'); |
| 3612 | if (!allFiles.has(pasFile)) continue; |
| 3613 | const formNode = ctx.getNodesInFile(file).find((n) => n.kind === 'file'); |
| 3614 | const unitNode = ctx.getNodesInFile(pasFile).find((n) => n.kind === 'file'); |
| 3615 | if (!formNode || !unitNode) continue; |
| 3616 | edges.push({ |
| 3617 | source: unitNode.id, |
| 3618 | target: formNode.id, |
| 3619 | kind: 'references', |
| 3620 | line: unitNode.startLine, |
| 3621 | provenance: 'heuristic', |
| 3622 | metadata: { synthesizedBy: 'pascal-form', registeredAt: pasFile }, |
| 3623 | }); |
| 3624 | } |
| 3625 | return edges; |
| 3626 | } |
| 3627 | |
| 3628 | /** |
| 3629 | * SvelteKit file-convention data flow. A route directory's `+page.svelte` (a |
no test coverage detected