Navigate to a Java element's declaration

  1. Open the junit.samples.money.MoneyTest.java file in the Java editor.
  2. On the first line of the MoneyTest class declaration, select the superclass TestCase and either

    Menu open declaration

    The TestCase class opens in the editor area and is also represented in the Outline view.
    Note: This command also works on methods and fields.

    Opened declaration

  3. With the TestCase.java editor open and the class declaration selected:

    Menu open type hierarchy

  4. The Hierarchy view opens with the TestCase class displayed.

    Type hierarchy view

    Note: You can also open editors on types and methods in the Hierarchy view.

Related tasks

Using the Hierarchy view
Opening a type hierarchy on a Java element
Opening a type hierarchy on the current text selection
Opening an editor for a selected element

Related reference

Type Hierarchy View