Find usage with another usage? Is that possible in Resharper?

Does anyone know how to find usage of a method call ALONG WITH another usage to another method call further down (the stack even)? I'm not sure if that's possible in Resharper.

This is pretty hard to explain, so I'll give you an example.

Let's say I have objectA.method() and objectB.method(). I want to find usages of objectA.method() being called ALONG WITH objectB.method() further down (the stack even).

THESE WOULD BE POSITIVE RESULTS

void main()
{
     objectA.method();
     objectB.method();
}



void main()
{
     objectA.method();
     doSomething();
}



void doSomething()
{
     objectB.method();
}


THESE WOULD BE NEGATIVE RESULTS

void main()
{
     objectB.method();
     objectA.method();     
}

If this is possible in Resharper (and I can see it would have all the tools at its disposal to do so) that would be AWESOME!

Thanks for your help
1 comment
Comment actions Permalink

Hello Chris,

ReSharper doesn't provide built-in functionality to do this at once, but
you can find usages of objectA.method() and then inspect the Call Hierarchy
(ReSharper | Inspect | Outgoing calls) for objectB.method() calls for each
call site. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Does anyone know how to find usage of a method call ALONG WITH another
usage to another method call further down (the stack even)? I'm not
sure if that's possible in Resharper.

This is pretty hard to explain, so I'll give you an example.

Let's say I have objectA.method() and objectB.method(). I want to find
usages of objectA.method() being called ALONG WITH objectB.method()
further down (the stack even).

THESE WOULD BE POSITIVE RESULTS
void main()
{
objectA.method();
objectB.method();
}
void main()
{
objectA.method();
doSomething();
}
void doSomething()
{
objectB.method();
}
THESE WOULD BE NEGATIVE RESULTS

void main()
{
objectB.method();
objectA.method();
}
If this is possible in Resharper (and I can see it would have all the
tools at its disposal to do so) that would be AWESOME!

Thanks for your help

---
Original message URL:
http://devnet.jetbrains.net/message/5275931#5275931



0

Please sign in to leave a comment.