ripper234
ripper234

Reputation: 229988

"Find Usages" in 3rd party libraries

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?

Upvotes: 27

Views: 17092

Answers (2)

Nico Huysamen
Nico Huysamen

Reputation: 10417

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 :)

Upvotes: 33

Ed Griffin
Ed Griffin

Reputation: 486

IntelliJ's Find Usages feature has scope "Project" and "Project and Libraries" (which includes your maven dependencies). It seems to me the "Project and Libraries" is not available on symbols defined in your source code, but is available on symbols defined in your dependencies.

Upvotes: 4

Related Questions