Java editor

The Java tools provide an editor that provides specialized features editing Java code.

The editor is associated with the 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 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 Navigator or 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
Java development tools (JDT)

Related tasks
Adding required import statements
Evaluating expressions
Formatting Java code
Generating getters and setters
Launching a Java program
Opening an editor for a selected element
Using content/code assist
Using the Java editor
Viewing compilation errors and warnings
Viewing runtime exceptions

Related reference
Java editor actions
Java editor preferences
Outline view for Java
Views and editors

Copyright IBM Corporation 2000, 2002. All Rights Reserved.