About the Java Editor |
The Java Editor is a full-featured text editor that is integrated with the Visual Designer , the compiler, the debugger, and other parts of the IDE. You can open the Java Editor by double-clicking the background of a page in the Visual Designer. You can also open the Java Editor by double-clicking any editable .java file in the Projects window. You use the Java Editor to edit your page beans, session beans, application beans, and other Java files in the project, such as any Enterprise JavaBeans you have added to the project.
This topic introduces the following Java Editor features:
The top of the Java Editor has a tab for each open document. Each tab shows the name of the document. If the document has been modified and has not been saved, there is an asterisk (*) after its name.You can use each document tab as follows:
The Java Editor toolbar is at the top of the edit window. The toolbar has buttons for various navigating and editing shortcuts, which vary according to the type of file you are editing. Hold the cursor over a button to display a description of the command.
For a description of individual toolbar buttons, see Java Editor Toolbar.
The left margin displays annotation glyphs that indicate line status, such as breakpoints, the program counter, or build errors. See Margin Glyphs in the Java Editor for a description of the glyphs used.
If you click the left margin of a Java file, a breakpoint is set on the corresponding line. You can also click the left margin of a line to remove a breakpoint.
You can right-click the left margin to display a pop-up menu. The margin can also optionally display line numbers.
A faint vertical line in the Java Editor marks a suggested right margin for your text. This configurable margin is set to 80 characters from the left margin by default.
The Java Editor status line is beneath the horizontal scroll bar. The first area of the status line shows the current line number and row number in the form line:row. The second area of the status line indicates the insertion mode (INS or OVR). The text area on the right is used for status messages.
Source code displayed in the Java Editor is syntactically colored. For example, all Java keywords are shown in blue and all Java comments in light gray. Guarded blocks of Java code generated by the Visual Designer have a light blue background and cannot be edited. See Setting Source Editor Fonts and Colors for Display for information on configuring syntax coloring.
When you edit some kinds of files, such as HTML files and Java source files, the IDE's code completion feature helps you complete words you are typing. See About Code Completion for more information.
When you edit Java classes, the Java Editor does matching of pair characters such as brackets, parentheses, and quotation marks. Closing characters are not duplicated if you type them yourself rather than letting the editor add them for you. See Using Pair Completion, Smart Enter, and Smart Semicolons for more information.
When the Java Editor is in insert mode, the default insertion point is a vertical bar, and text that you type is inserted. In overwrite mode, the default insertion point is a solid block, and text that you type replaces the existing text.
Use the Insert key to toggle between the two modes.
Whenever the insertion point in the Java Editor is located immediately after a brace, bracket, or parenthesis, the matching brace, bracket, or parenthesis is highlighted.
| Legal Notices. Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. |