[Java] eclipse shortcut table

2 minute read

Introduction

OS is Windows 10
Basically, I have confirmed the operation with sts4, but it should also work with Eclipse and Pleiades.
You can find as many shortcuts as you want, but I didn’t have a nice site that I could see personally, so I just made a rough table.
I’m not sure, but on macOS, if you change Ctrl to command and Alt to option, most of them should work.

In the first place, I have posted the ones that I was happy to use, but I personally added the ones that were particularly easy to use and the ones that I used frequently, so I hope it will be helpful.

In the editor

Copy and delete

Shortcut Key Supplement
Select all Ctrl + A  
copy Ctrl + C Select any location
paste Ctrl + V Select any location
cut Ctrl + X Select any location
★ Line copy Ctrl + Alt + ↓ Paste one line down
★ Delete line Ctrl + D  
Delete from caret to end of line Ctrl + Shift + Delete  

Adjust the appearance of the code

Shortcut Key Supplement
Line by line/Move down Alt + ↑/↓  
★ Indentation Ctrl + Shift + F  
Indent to the right tab Multiple lines can be selected
Indent on the left Shift + tab Multiple lines can be selected

Improved work efficiency

Shortcut Key Supplement
Template proposal Ctrl + space Code writing assistance. Recommended by Guguru
Import the most recently written class Ctrl + Shift + M  
import organization Ctrl + Shift + O Import multiple classes, delete unnecessary imports
★ quick fixes display Ctrl + 1 Fix compilation errors
★ Move to the next warning / error Ctrl + .  
Method type change Shift + Alt + C The reference source etc. also changes arbitrarily
Open method call hierarchy Ctrl + Alt + H Press in the definition or on the declaration. ◎ for decoding the code
rename Shift + Alt + R Both variables and methods are possible. The callee also changes
★ Caret movement Ctrl + ←/→ Move word by word, etc. ◎ when combined with Shift
★ Make a comment/return Ctrl + / Select any location
★ Corresponding brackets Ctrl + Shift + P  
★ Expansion of selection range/Shrink Shift + Alt + ↑/↓ Automatically selects for each group

Outside the editor

File tab

|Shortcut|Key|Supplement|
|:—————–|——————:|:——————:|
|★ Undo|Ctrl + Z||
|Redo|Ctrl + Y|Advance what has been returned too much|
|★ Save file|Ctrl + S||
|Save all files|Ctrl + Shift + S||
|Close file|Ctrl + W||
|Close all files|Ctrl + Shift + W||
|★ Return to the edit tab/move on|Alt + ←/→||

Shortcut Key Supplement
File search Alt +Press A and F  
Java file search Alt + H  
★ Search and move to the edit tab Ctrl + E A list of tabs will appear, so select and move
String search Shift + F  
Type search Ctrl + Shift + F