* 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)
| 1589 | * definition isn't orphaned, and editing the form surfaces its code-behind unit. |
| 1590 | */ |
| 1591 | function pascalFormEdges(ctx: ResolutionContext): Edge[] { |
| 1592 | const edges: Edge[] = []; |
| 1593 | const allFiles = new Set(ctx.getAllFiles()); |
| 1594 | for (const file of allFiles) { |
| 1595 | if (!/\.(dfm|fmx)$/i.test(file)) continue; |
| 1596 | const pasFile = file.replace(/\.(dfm|fmx)$/i, '.pas'); |
| 1597 | if (!allFiles.has(pasFile)) continue; |
| 1598 | const formNode = ctx.getNodesInFile(file).find((n) => n.kind === 'file'); |
| 1599 | const unitNode = ctx.getNodesInFile(pasFile).find((n) => n.kind === 'file'); |
| 1600 | if (!formNode || !unitNode) continue; |
| 1601 | edges.push({ |
| 1602 | source: unitNode.id, |
| 1603 | target: formNode.id, |
| 1604 | kind: 'references', |
| 1605 | line: unitNode.startLine, |
| 1606 | provenance: 'heuristic', |
| 1607 | metadata: { synthesizedBy: 'pascal-form', registeredAt: pasFile }, |
| 1608 | }); |
| 1609 | } |
| 1610 | return edges; |
| 1611 | } |
| 1612 | |
| 1613 | /** |
| 1614 | * SvelteKit file-convention data flow. A route directory's `+page.svelte` (a |
no test coverage detected