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

Copy

Copies the currently selected text or elements to the clipboard

Ctrl + C

Copy Qualified Name

Copies the fully qualified name of the currently selected element to the clipboard

 

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
Expand Selection To
  • Enclosing Element: Selects the enclosing expression, block, or 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 elements. (Arrow Right)
  • Previous Element: Selects the current and previous elements. (Arrow Left)
  • Restore Last Selection: Restores the previous selection after an invocation of Expand Selection To. (Arrow Down)
Alt + Shift + Arrow Keys
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.  
Smart Insert Mode Toggles the Insert Mode. When smart insert mode is disabled, typing aids like automatic indentation, closing of brackets etc. are disabled. Ctrl + Shift + Insert
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 content assist dialog at the current cursor position. By default content assist supports five different categories of proposals.
  1. Default - union all of proposals
  2. Type Proposals (e.g. java.lang.String, List)
  3. Other Java Proposals (e.g. method or field names)
  4. Template Proposals (e.g. 'iterate over array' template)
  5. Word Proposals (Proposes words which have been typed already)

See the Java Editor preference page for configuring the behavior of code assist and the contents of the Default proposal category.

See the Templates preference page for available templates.

Ctrl + Space
Word Completion Proposes word completions for the current string based on all words found in any open editor. Works in all text based editors. Alt + /
Quick Fix Opens a dialog with possible solutions if the cursor is located near a problem indication. Ctrl + 1
Set Encoding Toggles the encoding of the currently shown text content.  
Java editor
Java development tools (JDT) Java editor
Java editor preferences
Java outline
Views and editors