The Source Editor is a full-featured text editor that is integrated with the
Filesystems window, compiler, debugger, and other parts of the IDE. You can open the Source Editor
window by double-clicking an editable element in the Filesystems window or by choosing
File New to create a new file.
The Source Editor has the following features:
The top of the Source Editor has a tab for each open document. Among other things, you can:
The tooltip for each tab displays more information about the file, including the type of file and the file's location.
Each modified and unsaved file in the Source Editor has an asterisk (*) after its name on its tab. You can save a file by choosing Save from the File menu or the Source Editor's contextual menu.
The Source Editor toolbar is at the top of the window above the editing pane. The toolbar contains buttons for various navigational 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.
If a Java file is open, the toolbar also contains a combo box that you can use to quickly navigate to any of the constructors, methods, or fields of the class.
For a description of individual toolbar commands, see Source Editor Toolbar.
The left margin displays annotation glyphs that indicate line status, such as breakpoints, the program counter, build errors, or bookmarks. See Margin Glyphs in the Source Editor for a description of the glyphs used.
If you click in the margin of a Java file, a breakpoint is set on the corresponding line. You can also click in the left margin of a line to remove a breakpoint.
You can right-click in the left margin to display a contextual menu. The margin can also optionally display line numbers.
A faint vertical line in the Source Editor marks a suggested right margin for your text. This configurable margin is set to 80 characters from the left margin by default.
The Source 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 Source 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 Form Editor have a light blue background and cannot be edited. See Setting Fonts and Colors 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 tries to help you complete words you are typing. See Using Code Completion for more information.
When you edit Java classes, the Source Editor does matching of pair characters such as brackets, parentheses, and quotation marks. The matching is "smart", so the closing characters are not duplicated if you type them yourself. See Pair Completion, Smart Enter, and Smart Semicolons for more information.
When the Source 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 Source Editor is located immediately after a brace, bracket, or parenthesis, the matching brace, bracket, or parenthesis is highlighted.
![]() |
If the Source Editor beeps when you try to enter new text, the file is a read-only file. |
See Also | |
---|---|
Configuring the Source Editor
Editing Java Code Editor Shortcuts |