添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more

I'm using Intellij with Maven, so it's very easy to download the source code of any 3rd party library I'm using (assuming it posted the source to the Maven repository, of course). Is it possible to find usages of a method within that 3rd party library?

In other words, I would like to use IntelliJ's "Find Usages" action and find usages that aren't in my code, but in the 3rd party source code. Is it possible? If not in IntelliJ, is there another tool that does this?

UPDATE

Ok, so I have found out that you can search for usages. When you ALT-F7 (find usages) on a method, simply select your scope as being Project and Libraries instead of just Project or Module. This works perfectly for me. Finds all usages of methods etc. in other libraries that have source code included.

ORIGINAL ANSWER I don't think that is possible (I might be wrong, so if anyone knows I would also be interested in the answer). As I understand it, adding the source code simply gives you the ability to "see" what is going on in that code. It is not really included in you project. IntelliJ only indexes your own project for finding usages etc.

As for other applications, I do not know :)

Intellij does index 3rd party code. When you "Go to class", you can find 3rd party code through it. ripper234 Nov 24, 2010 at 6:41 That is true. Maybe in a similar fashion you can force IntelliJ to find usages in 3rd party code. I will have a go and see if I can find anything. Nico Huysamen Nov 24, 2010 at 6:42 Great, this will be most useful. I was doing CTRL-ALT-F7, which simply does nothing on external methods. ripper234 Nov 24, 2010 at 7:37 For a Mac I had to press Shift-Alt-Cmd-F7 together. As if life wasn't complicated enough already matt freake Jan 18, 2018 at 14:32

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .