Editing Source Files
The IDE's built-in Source Editor enables you to
view, create, and edit your source code.
You can open the Source Editor
window by double-clicking an editable element in the Projects window or by choosing
File > New to create a new file.
The IDE has many features to simplify coding of Java files such as:
- Code completion.
A dialog box appears and offers possible ways of completing the expression
you are typing.
- Code templates.
You can enter common code snippets by typing abbreviations for those snippets.
- Editor hints. For some common coding mistakes,
the Source Editor provides hints for adding the missing code and offers to add the
code for you automatically.
- Word match. After you type the beginning
characters of a word used elsewhere in your code, the Source Editor generates
the rest of the word.
- GUI Builder. Visually
design Java GUI applications.
- Refactoring. Change
the structure of your code without changing the functionality.
- Navigation Shortcuts. Include keyboard shortcuts that
enable you to navigate to a source file, declaration statement, or Javadoc
documentation based on the location of the insertion point.
- Code Folding. Enables you to hide
sections of code, such as Javadoc comments and method bodies.
- Pair Completion, Smart Enter, and
Smart Semicolons. When you type a quotation mark, bracket, brace,
or parenthesis, the Source Editor automatically inserts the closing character.
The matching is "smart", so the closing characters are not duplicated if you
type them yourself.
- Code templates and macros. Use built-in
code templates and macros to quickly generate common code snippets. You can also
create your own code templates and macros.
- Import Management. The Alt-Shift-I keyboard
shortcut helps you generate an import statement for the class you are typing and
the Alt-Shift-F command adds all missing import statements for the entire file.
- Generation of code for beans.
You can generate code for bean properties and event sets.
- Override and Implement Methods Dialog
Box. View methods that you can override or implement in a class.
- You can find information about other Source Editor features in help topics that
are specific to the type of application you are developing.
- See Also
- Modifying GUI Source Code
- Editor Shortcuts
- Setting Keyboard Shortcuts
- Configuring the Source Editor
Legal Notices