Edit actions
Edit menu commands shown when a Java Editor is visible:
Name
Function
Keyboard Shortcut Undo
Revert the last change in the editor
Ctrl + Z Redo
Revert an undone change
Ctrl + Y Cut
Copies the currently selected text or element to the clipboard and removes the element. On elements, the remove is not performed before the clipboard is pasted.
Ctrl + X Copies the currently selected text or elements to the clipboard
Ctrl + C Paste
Paste the current content as text to the editor, or as a sibling or child element to the a currently selected element.
Ctrl + V Delete Delete the current text or element selection. Delete Select All Select all the editor content.. Ctrl + A Find / Replace Open the Find / Replace dialog. Editor only. Ctrl + F Find Next Finds the next occurrence of the currently selected text. Editor only. Ctrl + K Find Previous Finds the previous occurrence of the currently selected text. Editor only. Ctrl + Shift + K Incremental Find Next Starts the incremental find mode. After invocation, enter the search text as instructed in the status bar. Editor only. Ctrl + J Incremental Find Previous Starts the incremental find mode. After invocation, enter the search text as instructed in the status bar. Editor only. Ctrl + Shift + J Add Bookmark Add a bookmark to the current text selection or selected element. Add Task Add a user defined task to the current text selection or selected element. Alt + Enter Expand Selection to
- Enclosing Element: Selects the enclosing expression, block, method in the code. This action is aware of the Java syntax. It may not function properly when the code has syntax errors. (Arrow Up)
- Next Element: Selects the current and next element. (Arrow Right)
- Previous Element: Selects the current and the previous element (Arrow Left)
- Restore Last Selection: After an invocation of Expand Selection to restore the previous selection. (Arrow Down)
Alt + Shift + Arrow Keys Show Tooltip Description Shows the value of a hover that would appear at the current cursor location. The dialog shown is scrollable and does not shorten descriptions. F2 Content Assist Opens a context assist dialog at the current cursor position to bring up Java code assist proposals and templates. See the Templates preference page for available templates (Window > Preferences > Java > Editor > Templates) and go to the Editor preference page (Window > Preferences > Java > Editor > Code Assist) for configuring the behaviour of code assist. Ctrl + Space Quick Fix If the cursor is located at a location with problem indication this opens a context assist dialog at the current cursor to present possible corrections. Ctrl + 1 Parameter Hints If the cursor is located at the parameter specification for method reference, this actions shows a hover with parameter types information.The parameter at the current cursor location is shown in bold. Ctrl + Shift + Space Encoding Toggles the encoding of the currently shown text content.
Java editor
Java development tools (JDT)
Java editor
Java editor preferences
Outline view for Java
Views and editors