Skip to content

Migrate EnumComponentReferences to use visitor pattern #45

@darianmiller

Description

@darianmiller

Once both Delphi.Forms.Visitor (#41) and component reference detection
(#40) ship, migrate EnumComponentReferences in Delphi.Forms.References
to use the visitor for traversal.

Reference detection is a clean visitor fit: VisitProperty checks each
fvIdentifier value against the component name index and collects matches.
The component name index is built in a first pass (or in VisitObject).

Scope

  • Implement a TReferenceVisitor that builds a component name index
    in VisitObject and detects references in VisitProperty
  • Replace ad-hoc recursion in EnumComponentReferences with
    WalkForm(Form, Visitor)
  • Public API unchanged

Acceptance criteria

  • All reference detection tests pass with identical output
  • No ad-hoc recursion remains in Delphi.Forms.References
  • Public API unchanged (backward compatible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions