开发者

How to get line number?

开发者 https://www.devze.com 2022-12-18 11:49 出处:网络
I have developed a plugin to search the references of a method.I want to print 开发者_高级运维out the line numbers where the method is referenced.I search for method going through IMethod class and ch

I have developed a plugin to search the references of a method.I want to print 开发者_高级运维out the line numbers where the method is referenced.I search for method going through IMethod class and check for a particular function reference.Now i want to print the line number.How can i do that?Help

Thanks


Okay so here's the answer from the comment... vote me up ;)

You can use ISourceReference (documentation). It contains the source range, from which you could derive the line number.

0

精彩评论

暂无评论...
验证码 换一张
取 消