How to find usages using Eclipse IDE?

I have following code:

public class MyClass{
   ...
}

At same workspace I have following class

public class AnotherClass{
   @Autowired
   MyClass myClass;
   ...
}

If I click right mouse button on MyClass(first mentioned) and select "open call hierarchy" I don't see anything.

How to find this usage in Eclipse?


Solution 1:

PC:

  1. Select a word (class name, method name, variable name, etc.)
  2. Press Ctrl+Shift+G

Mac:

  1. Select a word (class name, method name, variable name, etc.)
  2. Press Alt+Cmd+G (++G)

Solution 2:

Right click on Myclass, find references in project|workspace.

Open call hierarchy, open inheritance hierarchy.