Java Editor

The Java editor provides specialized features for editing Java code.

Associated with the editor is a Java-specific Outline view, which shows the structure of the active Java compilation unit. It is updated as the user edits the compilation unit.

The editor can also show a breadcrumb navigation bar. The breadcrumb shows the parent chain of the element at the current cursor position. It is also updated when the user edits the compilation unit or changes the selection.

The Java editor can be opened on binary CLASS files. If a JAR file containing the CLASS files has a source attachment, then the editor shows the corresponding source.

The editor includes the following features:

The Java editor can be configured to either show an entire compilation unit or a single Java element only. To change the setting, use the toolbar button Show Source of Selected Element Only.

The most common way to invoke the Java editor is to open a Java file from the Package Explorer using pop-up menus or by clicking the file (single or double-click depending on the user preferences). You can also open the editor by opening Java elements, such as types, methods, or fields, from other views.

Related concepts

Quick fix and assist
Templates

Related tasks

Opening an editor for a selected element
Viewing runtime exceptions
Evaluating expressions

Related reference

Quick assists
Quick fixes
Java editor actions
Java editor preferences
Java outline
Java Editor Breadcrumb
Views and editors