Viewing the type hierarchy

In this section, you will learn about using the Hierarchy view by viewing types and members in a variety of different ways.

  1. In the Script Explorer view, find Test.js. You can also open type hierarchy view:

    Context menu

  2. The buttons in the view tool bar control which part of the hierarchy is shown.  Click the Show the Type Hierarchy button to see the class hierarchy, including the base types and subtypes.

    Type hierarchy

  3. Click the Show the Supertype Hierarchy button to see a hierarchy showing the type's parent elements including implemented interfaces. This view shows the results of going up the type hierarchy.

    Supertype hierarchy

    In this reversed hierarchy view, you can see that MyTest inherits the Test type.
  4. Click the Show the Subtype Hierarchy button in the view toolbar.

    Subtype hierarchy

  5. Open the Test.js type and the following method in props section:
    //> public void test()
    test : function() {
    	vjo.sysout.println("Test");
    }
    
    Open the MyTest.js type and the following method in props section:
    //> public void test()
    test : function() {
    	vjo.sysout.println("My Test");
    }
    
    Click the Lock View and Show Members in Hierarchy button in the toolbar of the member pane, then select the test() method in the member pane. The view will now show all the types implementing test().

    Subtype hierarchy showing method implementors

  6. Use Previous Type Hierarchies to go back to a previously opened element. Click on the arrow next to the button to see a list of elements or click on the button to edit the history list.

    Previous Type Hierarchy

Quick Type Hierarchy

If you are working in the editor and only want to do a quick lookup for a hierarchy you can use the Quick Type Hierarchy:

  1. Open MyTest.js file in the VJET editor if you do not already have it open.
  2. Select the type name in the VJET editor
  3. Press Ctrl+T or invoke Navigate > Quick Type Hierarchy and the in-place type hierarchy view is shown.
  4. Pressing Ctrl+T while the type hierarchy view is shown will toggle between supertype hierarchy and subtype hierarchy.
Quicktype dialogs showing subtype and supertype hierarchy Quicktype dialogs showing subtype and supertype hierarchy

Related reference