Is there a straightforward way to find references in my code to a class in an external library (jar without source) if I don’t already have a file open that has a reference to the class?
For instance, say I want to find all references in my code to System.out.println() but I don’t already have code open that uses println. How can I do this?
You can open any type (class or interface) via Ctrl+Shift+T (Command+Shift+T on a Mac). When the class/interface source opens, select a method or field (instance variable) in that class, right-click, and choose References.
If you don’t have the source code, you’ll see the Class File Editor, “Source not found” window. If you don’t already have the “link with editor” icon enabled, either enable it or select the Navigate menu, Show In, Package Explorer. Then in the package explorer, select a method or field (instance variable) in that class, right-click, and choose References.