Guide to the most useful Eclipse Shorcuts

Share


E
clipse is one of the best IDEs which developers use for their development tasks. It has provided the shortcuts to the most common actions that they perform. Here, I have listed the most useful shortcuts which result in faster development using the IDE. Enjoy 🙂

 

Ease of Navigation Eclipse Shortcuts

CTRL SHIFT R – Open a resource. You need not know the path and just part of the file name is enough.
CTRL + SHIFT + T – Open / Search for Types.
CTRL PAGE UP or PAGE DOWN – Navigate to previous or next file from within the list of all open files.
ALT – Go to previous or next edit positions from editor history list.
CTRL E – Open a file (editor) from within the list of all open files.
CTRL + SHIFT + P – Go to the matching bracket.

Java Editing with ease– Eclipse Shortcuts

CTRL / – Comment a line.
F3 – Go to the declaration of the variable.
F4 – Show type hierarchy of on a class.
CTRL + T – Show the inheritance tree of the current Java class.
CTRL + Shift + F – Format source code.
ALT SHIFT Z – Enclose block in try-catch.
SHIFT F2 – Show Javadoc for current element.
CTRL SPACE – Type assist.
CTRL SHIFT U – Find reference in file.
CTRL + Space – Content assist/ code completion.
CTRL + O – Show all methods of the current class, press CTRL + O again to show the inherited methods.
F12 – Focuses on the editor (especially helpful if you work with Fast Views).
Ctrl + M – Maximize Java editor.
CTRL + Shift + O – Organize the imports; will import the missing import statements.
CTRL + Q– Go to position the cursor at the last changed position in the editor.

The Generic ones – Eclipse Shortcuts

F12 – Focus on current editor.
CTRL L – Go to line number.
CTRL D – Delete a line.
CTRL – Move one element left or right.
CTRL M – Maximize editor.

Quick Run, Debug – Eclipse Shortcuts

CTRL . or , – Navigate to next or previous error.
F5 – Step into.
F6 – Step over.
F8 – Resume
CTRL Q – Inspect.
CTRL F11 – Run last run program.
CTRL 1 – Quick fix code.
Alt + Shift + X – J – Run current selected class as Java application.

Making Search easy– Eclipse Shortcuts

CTRL SHIFT G – Search for current cursor positioned word reference in workspace.
CTRL H – Java search in workspace.
Ctrl + . – Go to the next problem / error.
Ctrl + , – Go to the previous problem / error.
RL + J , CTRL + K – Incremental search, find next.

Some more with Arrow Keys – Eclipse Shortcuts

CTRL + Left – Move one element to the left.
CTRL + Right – Move one element to the right.
CTRL + ALT + – Up/Down Copy line.
ALT + Up / Down – Move line up / down.
ALT + SHIFT Up / Down – Select the previous / next syntactical element.
ALT + SHIFT Up / Down / Left / Right – Extending / Reducing the selection of the previous / next syntactical element.
CTRL + Up / Down – Scroll up / down a line in the editor.