2

I'm writing a plugin for ReSharper 7, and I'd like to be able to use Call Tracking from inside my plugin. I haven't come across anything in the SDK that lets me do this, is it possible at all?

Specifically, I want to be able to get the "incoming calls" and "outgoing calls" of a method from inside my IRecursiveElementProcessor.

1 Answer 1

1

'Call Tracking' in ReSharper a user-end feature but not a generic engine for use in other features. Basically it uses two APIes - Find Usages and Resolve. To find usages (calls) to your method or property you must use IPsiServices:Finder and to find methods and properties that are called from given code block you must process it's syntax tree with RecursiveElementProcessor, ask for references for each tree node ITreeNode:GetReferences() and resolve each reference using IReference:Resolve. Basic interfaces that you use should for these operations are: ITreeNode IReference IDeclaredElement IDeclaration

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.