Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find references of a class in Eclipse?

Tags:

eclipse

People also ask

Where are the .class files stored in Eclipse?

The first thing you need to do is add a “Class Files” folder to the “Project 1” directory. You can do this via the File menu option. Once you are done, your Eclipse screen will look something like that below. Drag the file to the “Class Files” folder you just created in Eclipse.

How do I open resources in Eclipse?

Under Navigate->Open Resource the shortcut Ctrl + Shift + R is shown.

How do I view libraries in Eclipse?

To get started, open the "Preferences" window in Eclipse. Navigate to "Java » Build Path » User Libraries" on the left-hand side and click the "New" button. Enter the library name and click the "OK" button (leave the "System library" checkbox alone).


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


  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)

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