Resharper 6.1 returning only base find usages results?

In R# 6.1 I just had an issue where I selected a method in a class which implements an interface, and hit Shift F12 (VS binding for Find Usages), and it is returning method usages of other implementers of the interface.  In R# 5 it used to have a separate dialog which would ask if I wanted to instead search for usages of the base class/interface, but I can't find that option, it acts as if the only way to search now is to include base class/instance usages.

Am I missing a setting or something (I've just gone with defaults), or did R# change how it works in v6(.1)?

I have a scenario as follows (C#):

public interface IFoo
{
   public SomeResult Bar(string input);
}

public class FooProviderA : IFoo
{
   // Nothing anywhere actually references this method, but when I "Find Usages" on this method it returns usages of FooProviderB's method
   public SomeResult Bar(string input)
   {
      // Do something
   }
}

public class FooProviderB : IFoo
{
   public SomeResult Bar(string input)
   {
      // Do something
   }
}



public class SomethingElse
{
   public void SomeFunction()
   {
      FooProviderB b = ...
      ...
      SomeResult result = b.Bar(value);  // This is the result from finding usages of FooProviderA.Bar, though it clearly isn't FooProviderA.Bar
   }
}

When I place the cursor on FooProviderA's Bar method signature and do Find Usages (key mapped or from menu), it returns FooProviderB's Bar method.
4 comments
Comment actions Permalink

Hello Andy
     In ReSharper 6.1 this dialog has been removed. If you'd like to find usages of a particular implementation, invoke Find Usages Advanced on that implementation and choose the implementing method in the Search Properties dialog. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Thank you for the quick reply Andrey!  If I may provide feedback (maybe there's a better place), this seems like a huge loss of functionality in 6.1!  If I want to be able to quickly find usages of a method, I can no longer do that without pulling up an advanced search dialog?  Otherwise, I'm just going to get results listing all uses of that method and other methods derived from the same base, with no indication in the results which is which, and there's no way to change this default behavior?  This will seriously slow me down, I used "find usages" all the time in R# 5.x, and now it's become "find possible usages".

I hope it's something that can get fixed!
Thanks,
Andy

0
Comment actions Permalink

Why would we only want to see base usages?  So if I implement IName anytime I want "public string Name { get; set; }", then I do a Find Usages on Person.Name, why would I want unfilterable results of Tractor.Name, Galaxy.Name, Rainbow.Name, Microbe.Name, etc????  Sure, we might want to see ALL USAGES, but why not "Usages at this Interface level"?  At this point, I Find Usages and get literally over a hundred results... but I care about 3 of them.  I care about anything that implements IPerson.IName, not just IName.

Problems like this would be common with Name, Description, ID, PrimaryKey, and CreateDate.

0
Comment actions Permalink

Hi Andrey

is there a bug in R# 7 because I do find usages on  the interface method (have selected it in the advanced dialog) but still get usages of implementations as result.

Kind regads
Sven

0

Please sign in to leave a comment.