Navigator Window (Java Projects)
See Also
The Navigator window provides a compact view of the currently selected file
and simplifies navigation between different parts of the file.
For Java files, you can see a list of constructors, methods, and fields.
For some kinds of XML files, you can use the Navigator to view the structure
of the file. The Navigator window works with standard XML documents, XML
schema files, and Ant scripts.
You can open the Navigator window by choosing Window > Navigator (Ctrl-7).
By default, the Navigator window opens in the lower left corner of the IDE.
To display a source file in the Navigator window, select the file in the Source
Editor, the Projects window, the Files window, or the Favorites window. Once
a file is displayed, you can use the Navigator window to focus on a specific
nodes contained in the document. To do so, click on a given node in the Navigator
window, and your cursor automatically relocates to the node's position in the
document.
Java Files
When a Java file is selected, a drop-down list appears at the top of the
Navigator window to enable you to choose between the following four views:
- Members view. Alphabetical listing of the selected source
file's members (constructors, methods, and fields).
- Tree. Detailed tree view of all parts of the selected
source file, including methods, fields, comments, and import statements.
- Elements. Hierarchical tree view of the selected
source file's members.
- Errors. A list of any syntax errors that are in the file.
You can display the Javadoc documentation for a member by hovering the mouse
over the member's node.
In the Members view, you can right-click a
node and choose the following commands:
- Go to Source. Opens the class in the Source Editor and
places the insertion point at the beginning of the constructor, method,
or field that the node represents.
- Sort by Name. Displays the members in alphabetical order.
- Sort by Source. Displays the members in the order in
which they appear in the code.
- Filters. Opens a submenu that enables you to select some
common filters for the types of members to display. You can select any
combination of the following filters:
- Show Inherited Members. Displays members that
come from classes that the current class extends.
- Show Fields. Displays the class's fields.
- Show Static Members. Displays static fields
and methods.
- Show Non Public Members. Displays members that
do not provide public access.
You can also activate and disable filters using the buttons at the bottom of
the Navigator window.
XML Files
For XML files, the Navigator view displays a tree of elements.
You can right-click an element node and choose the following options for the
level of detail to have displayed on the lines in the Navigator window:
- Show Attributes. Displays the attributes of each element.
- Show Content. Displays the text content of each element.
Ant Build Scripts
When an Ant build script is selected, a drop-down list appears at the top of the
Navigator window to enable you to choose between the following two views:
- Ant Targets. Alphabetical listing of build targets.
- XML View. Hierarchical tree view XML elements in the build
script.
When the Ant Targets view is selected, you can right-click a node and choose
one of the following commands:
- Open. Opens the file in the Source Editor and places
the insertion point at the beginning of the selected target's line.
- Run Target. Runs the selected target.
- Create Shortcut.
Opens a wizard that enables you to create a menu item, a toolbar item,
a keyboard shortcut, and custom code for running the target.
- Properties. Displays properties for the target in a
property sheet. These properties are not editable.
When XML View is selected, you can right-click a node and choose one of the
following options for the level of detail to have displayed:
- Show Attributes. Displays the attributes of each element.
- Show Content. Displays the text content of each element.
- See Also
- Code Navigation: Quick Reference
Legal Notices