Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Jul 26, 2024
1 parent 2166603 commit 26906d7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Classification;
Expand Down Expand Up @@ -71,6 +72,8 @@ internal sealed class FindUsagesLSPContext : FindUsagesContext
// Unique identifier given to each definition and reference.
private int _id = 0;

public StringBuilder Builder = new();

public FindUsagesLSPContext(
IProgress<SumType<VSInternalReferenceItem, LSP.Location>[]> progress,
Workspace workspace,
Expand Down Expand Up @@ -158,7 +161,10 @@ public override async ValueTask OnReferencesFoundAsync(IAsyncEnumerable<SourceRe

// If this is reference to the same physical location we've already reported, just
// filter this out. it will clutter the UI to show the same places.
if (!_referenceLocations.Add((document.FilePath, reference.SourceSpan.SourceSpan)))
var tuple = (document.FilePath, reference.SourceSpan.SourceSpan);
Builder.AppendLine(tuple.ToString());

if (!_referenceLocations.Add(tuple))
return;

// If the definition hasn't been reported yet, add it to our list of references to report.
Expand Down

0 comments on commit 26906d7

Please sign in to comment.