Reporter | Joe White (joewhite) |
---|---|
Created | Dec 23, 2011 3:31:22 AM |
Updated | Dec 30, 2011 12:05:35 PM |
Priority | Critical |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Kirill Skrygan (kirillskrygan) |
Subsystem | No subsystem |
Affected versions | 6.1 |
Fixed in build | No Fixed in build |
If I try to Find Usages on a method that's referenced in a doc comment, ReSharper counts the doc-comment reference but does not show it in the Find Results, leading to inconsistent behavior. For example, the Find Window will say "Displaying 1 of 2 found usages in solution", with no indication of why it's showing incomplete results.
Repro case:
Do a Find Usages on MethodTwo.
Expected behavior: ReSharper should realize that there's only one usage (the call in Main), and to jump directly to it.
Actual behavior: ReSharper shows the Find Results window, with results that look like the following: (with "Group by:" set to "Namespace, Type and Member")
If you remove the doc comment, and try the Find Usages again, it behaves as expected.
It shouldn't say "Displaying 1 of 2" (suggesting that the list is filtered) if I haven't done anything to filter the list. At first I thought this meant that ReSharper's Find Usages engine was completely broken and returning corrupted results, which is a scary thought. It got less scary when I did a Find In Files and realized it was just choking on the doc comment, but this is one of those bugs that leaves a nasty first impression.
Either ReSharper should always count the doc-comment reference as a usage (in which case it should show up in Find Results, giving me "Displaying 2 of 2"), or it should never count it as a usage (in which case it should realize that there's only one reference, and either jump straight there, or display "Displaying 1 of 1" in my Find Results, depending on my "if there is only one result, navigate without displaying the list" preference setting.)
Repro case:
/// <summary> /// Does something related to <see cref="MethodTwo"/>. /// </summary> public static void MethodOne() { ... } public static void MethodTwo() { ... } public static void Main() { MethodTwo(); }
Do a Find Usages on MethodTwo.
Expected behavior: ReSharper should realize that there's only one usage (the call in Main), and to jump directly to it.
Actual behavior: ReSharper shows the Find Results window, with results that look like the following: (with "Group by:" set to "Namespace, Type and Member")
Search Target ConsoleApplication2.Program.MethodTwo():void Displaying 1 of 2 found usages in solution ConsoleApplication2 Program Main():void MethodTwo();
If you remove the doc comment, and try the Find Usages again, it behaves as expected.
It shouldn't say "Displaying 1 of 2" (suggesting that the list is filtered) if I haven't done anything to filter the list. At first I thought this meant that ReSharper's Find Usages engine was completely broken and returning corrupted results, which is a scary thought. It got less scary when I did a Find In Files and realized it was just choking on the doc comment, but this is one of those bugs that leaves a nasty first impression.
Either ReSharper should always count the doc-comment reference as a usage (in which case it should show up in Find Results, giving me "Displaying 2 of 2"), or it should never count it as a usage (in which case it should realize that there's only one reference, and either jump straight there, or display "Displaying 1 of 1" in my Find Results, depending on my "if there is only one result, navigate without displaying the list" preference setting.)