Opening on a Type

You can open an editor on any type in the workbench.

Note: If you open a type from a CLASS or JAR file, you will see an empty editor unless you have attached source to it. See Attaching Source to a JAR File

1.

From the menu bar, select Project > Open Type.

2.

The Open Type dialog opens.

Note: If a type name is used for both an interface and a class, the icon shown in the upper pane in the dialog will be either the interface icon or the class icon for both types.

3.

In the Choose a type field, begin typing an expression that will help narrow the list of available types, using wildcards as needed.

As you type, the list is filtered to display only types that match the current expression.

4.

In the Matching Types list, select a type.

5.

When there is more than one definition of a type, then in the In Packages list, select a package and project.

6.

Select or deselect the Show in Type Hierarchy option to indicate whether you also want to open the type in the Hierarchy view.

If you chose this option, the type's hierarchy is shown either in the Hierarchy view in the current perspective (it will open automatically if needed) or in a new Java Hierarchy perspective, depending on the option chosen for new type hierarchies on the Java preferences page (Window > Preferences > Java).

If it opens in a new Java Hierarchy perspective, then it opens in a location dependent upon the option chosen for new perspectives on the Workbench preferences page (Window > Preferences > Workbench).

7.

Click OK when you are done.

8.

An editor opens on the selected type, and if selected, the type's hierarchy is shown.