Roslyn: Filters in CodeLens results for references

Created on 14 Nov 2019  路  6Comments  路  Source: dotnet/roslyn

_This issue has been moved from a ticket on Developer Community._


Ability to filter list of references. The existing collapse all, refresh, and dock options are great, but in a large code base, the ability to also filter is necessary.

For example, I am currently working in a project that has multiple interfaces, and these interfaces are implemented by many classes, CodeLens is great to see all references, but it is still really hard and time consuming to find what I'm looking for.

Below is an example of CodeLens telling me that there are 99+ references for this interface method, imagine being able to filter and group these results. It could be a feature that only works when you dock the CodeLens results, and that would be fine.

Image:101874-codelens.png


Original Comments

Visual Studio Feedback System on 11/1/2019, 00:21 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

Area-External Developer Community Feature Request

Most helpful comment

All 6 comments

[Copied from VS Feedback Hub marked as duplicate as this issue.]
I love the codelense reference, but often there鈥檚 so many references I need to collapse all and dig through all of them.
The particular case I鈥檓 facing often is that I鈥檓 not looking for references of a properties getter, I only want to see the use of setters to figure out how the property is set.

I鈥檇 like to be able to filter on Get vs. Set operation for properties.

@olegtk Is this even possible using the available CodeLens APIs?

Not at the moment, but we own References UI so please route the bug to the editor, @jinujoseph

@olegtk Have moved the DC feedback to your team.

I would love this feature. I specifically want to be able to exclude all the references from my unit tests. Sometimes I'll scan through the source looking for dead code with zero references, but if the method has a unit test it will always have references.

Was this page helpful?
0 / 5 - 0 ratings