Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find usage of an API method in all libraries in classpath?

In Eclipse, I can easily find out where is a method used in all jars in the classpath. This is very useful because I am using a library whose API is not well documented. I always need to find out how an API method is used by the library itself.

But in IntelliJ, I can only find the usage in the source code of my own project. Is it possible to do it in all jar files in my classpath? How? Thanks.

like image 611
chance Avatar asked Aug 28 '13 08:08

chance


2 Answers

You can use ctrl-alt-shift-f7 to adjust the scope of your find-usages search to Project and libraries.

In addition to your project files, it will search everything under External Libraries in your project pane - i.e. maven dependencies and the jdk.

However, for some reason I can't see any project libraries or global libraries under External Libraries, and as such they seem to be excluded from this search...

like image 62
vikingsteve Avatar answered Nov 09 '22 20:11

vikingsteve


It appears to be a bug in IDEA that Find Usages doesn't search under module libraries. See my comment here for the details and vote for the issue to get it fixed sooner.

like image 38
CrazyCoder Avatar answered Nov 09 '22 21:11

CrazyCoder