Pair Completion, Smart Enter, and Smart Semicolons
See Also
When you edit Java classes, the Source Editor does "smart" matching of pair
characters such as brackets, parentheses, and quotation marks. When you type
one of these characters, the Source Editor automatically inserts the closing
character. If you type the closing character yourself, the Source Editor
removes the character it added automatically, so the closing character is not duplicated.
In addition, you can:
- Use the Shift-Enter keyboard shortcut to start a new line
when the insertion point rests before the closing pair character.
- Type a semicolon (;) when the insertion point rests inside automatically inserted
pair characters. The semicolon is automatically inserted at the end of the statement.
- Split a string over two lines by pressing Enter while you are typing the string.
The quoted text is split over two lines with corresponding quotation marks and plus (+)
symbol added automatically. If you want to move to the next line without splitting
the current line, type Shift-Enter.
To turn off the pair matching and smart enter features:
- Choose Tools
Options.
Expand Editing
Editor
Settings and select Java Editor.
- In the Expert section of the property sheet,
deselect the Pair Character Completion checkbox.
 |
You can press Ctrl-Enter to split the current line at the insertion point without
moving the insertion point to the next line.
|
Legal Notices