Managing Code with Class Outline

The Class Outline window lists all classes, interfaces, and delegates defined in a .java source file. All imported classes, and all classes that are contained within the file’s package, are also listed. Whenever you open a .java file in the Text editor, Class Outline automatically displays the information for that file.

Class Outline shows the following details for each class:

  • The superclass, as well as all other classes in the inheritance hierarchy

  • The members that are inherited from the superclass, as well as from the other classes in the inheritance hierarchy

  • Any interfaces that the class implements

  • Any initializer blocks defined in the class

  • Any nested or member classes contained within the class

  • Any nested interfaces contained within the class

  • The methods and member variables defined by the class

When an item is selected in Class Outline, any associated Javadoc comments are displayed in the lower pane of Class Outline.

Using Class Outline, you can:

Class Outline is available whenever you open a .java file in the Text editor, and by default, it is tab-linked with the Toolbox. If you close Class Outline, you can later reopen it by pointing to Other Windows on the View menu and clicking Document Outline.

Refreshing Class Outline

In most cases, the items displayed by Class Outline are automatically synchronized with the associated declarations in the source file; for example, if you change the name of a method in your class, the method name is immediately updated in Class Outline. However, you must manually refresh Class Outline if you change the declaration of an inherited method. Class Outline does not automatically update the list of inherited members.

To refresh Class Outline, right-click the Class Outline window and click Refresh on the shortcut menu.