Search code examples
javaintellij-ideadependency-management

How to find all code depending on a jar in IntelliJ?


In JetBrains's .NET world I can use "Find Code Dependent on Module" in ReSharper or "Find Dependent Code" in Rider to easily find all usages of a library (likely excluding reflective uses, for obvious reasons).

What is the equivalent in IntelliJ and the Java world?

I have tried expanding the external library under the External Libraries section of the Project window, right-clicking the *.jar entry and choosing "Find Usages", but no results are ever found even with really simple cases.


Solution

  • This feature is not currently implemented. Feature request IDEA-51267 hopes to implement this feature.

    However, you can expand the jar file and select packages inside of it. Then choose Find Usages: Expanded jar file, with find usages highlighted

    By default, the dependencies are grouped by usage type; however, this may include internal usages of the classes. To prevent this, click Group by Usage Type. This lists all of the usages sorted by module.