Search code examples
javaeclipseshortcut

How to find forward reference in eclipse?


Is there any way by which I can find out all classes which implement a particular interface? For example, if I have a interface as follows:

public interface myIntFac{}

I want to find all classes inside current project that implement this interface. How can I find it out in Eclipse?


Solution

  • At the interface level, you can use (assuming the cursor in on the interface)

    • CTRL+T to show the Quick Type Hierarchy
    • F4 to Open Type Hierarchy

    At the method level, if you hover a method while holding down the control key, a pop-up box gives you the following choices:

    • Open Declaration
    • Open Implementation

    alt text
    (source: eclipse.org)

    And from anywhere, you can use:

    • CTRL+SHIFT+H to open the Open Type Hierarchy pop-up and search for any type/interface.