Skip to content

feat(code-editor): InlineHints — count references from decompiled external assemblies #196

@abbaye

Description

@abbaye

Summary

CodeLens reference counts currently cover only source files in the solution workspace. References inside external/NuGet/GAC assemblies referenced by the project are not counted.

Context

A TODO has been placed in CodeLensService.ComputeLensData() (after the workspace scan loop) marking the exact insertion point for this feature.

Proposed Approach

  1. For each project in the solution, resolve the list of referenced assembly paths (<Reference>, <PackageReference>, project-to-project refs)
  2. For each assembly, decompile to C# skeleton text using AssemblyAnalysisEngine + CSharpSkeletonEmitter (already available in WpfHexEditor.Core.AssemblyAnalysis)
  3. Feed the decompiled text into a per-assembly cache bucket within WorkspaceFileCache, keyed by assembly identity (name + version + culture + public key token) to avoid re-decompiling on every lens refresh
  4. Run the same CountWholeWordOccurrencesInText() scan on the decompiled lines and add to the count

Acceptance Criteria

  • CreateProviderWithData defined in project A shows +N references when called from an assembly B that references project A
  • Cache is invalidated when the referenced assembly is rebuilt or replaced on disk
  • Decompilation runs entirely on a background thread; no UI freeze
  • Falls back gracefully (0 external refs) if decompilation fails

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions