29

I have a java class in my project, how can I find all of the places it's being used? Similar to Visual Studios find references.

Thanks.

3 Answers3

44

Put the mouse cursor/caret on the class or method name in source code and hit Ctrl+Shift+G.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
11
  1. Right-click the class in project explorer, or in the editor
  2. Select References -> Project (or the other options, if they fit your case better)
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
7

Just a follow up since I was looking for all references for ALL public methods of a class in Eclipse:

  • Open the class in the editor
  • Open the Outline view
  • select all the methods you want to analyze
  • Hit Ctrl+Alt+H

This gives call hierarchy results for each method you selected. Hope this helps!

Edit: used the actual LIST item formatter

Nicolas Filotto
  • 43,537
  • 11
  • 94
  • 122
user3165731
  • 81
  • 1
  • 1