Mirat Kadenov recently asked for a feature request: find usages should restrict usages by type parameters:
It may be useful to be able to specify type parameter when finding usages of generic. For example, I want to find all usages of ArrayList, not all usages of ArrayList<>
The original YouTrack issue is IDEA-85190 Find Usages of generic type with specifying type parameters
Dmitry Jemerov opening a forum thread so we can do a little brainstorming about this.
Dmitry said:
By the way, a less intrusive solution to this would be grouping/filtering usages by type parameter value in the Find Usages results. What do you think about it?
Some refactorings rely on find usages.
I know rename is one of them, but I always want to rename the class regardless of the type parameter.
What other refactorings are affected by find usages?
If none of them need to be performed differently depending on the type parameter, then the grouping/filtering idea is very good.
The refactoring question is actually somewhat irrelevant; although the underlying logic is the same, the top-level UI is different, and implementing the originally requested feature would not mean that you will get an extra prompt when invoking Rename or a similar refactoring.
There is already a "Find usages" dialog for classes with option checkboxes like "Search for text occurrences". What about adding 2 new checkboxes:
The checkboxes would be disabled if the actual type parameter(s) cannot be determined at the search site.