-
-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
Description
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
- For each project in the solution, resolve the list of referenced assembly paths (
<Reference>,<PackageReference>, project-to-project refs) - For each assembly, decompile to C# skeleton text using
AssemblyAnalysisEngine+CSharpSkeletonEmitter(already available inWpfHexEditor.Core.AssemblyAnalysis) - 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 - Run the same
CountWholeWordOccurrencesInText()scan on the decompiled lines and add to the count
Acceptance Criteria
CreateProviderWithDatadefined 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
- bug(code-editor): InlineHints reference count shows current-file only — WorkspaceFileCache not re-triggered after solution load #195 (CodeLens race condition fix — prerequisite)
- feat(assembly-explorer): DecompilerService emits skeleton stubs only — wire real decompiler backend (ILSpy) #188 (ILSpy decompiler backend — may be useful here)
Sources/WpfHexEditor.Editor.CodeEditor/Services/CodeLensService.cs— TODO at line ~190Sources/WpfHexEditor.Core.AssemblyAnalysis/— CSharpSkeletonEmitter + AssemblyAnalysisEngine
Reactions are currently unavailable