Some of Eclipse Shortcuts

Eclipse is a very flexible and versatile tool which comes in many flavours. Here are some shortcuts which may be useful

Table 1. Navigation
Shortcut Description| Ctrl + Shift + R | Open / Search for resources, e.g. files |
Ctrl + Shift + TOpen / Search for Types
Ctrl + EAllows to select an editor from the currently open editors
Ctrl + F8Shortcut for switching perspectives
Alt + ← or Alt + →Go to previous/ next editor position in history
Ctrl-PageUp/PageDownSwitch to previous/next editor
F3Go to the declaration of this variable
Ctrl + Shift + PGo to the matching bracket
Table 2. Search
Shortcut Description| Ctrl + . | Go to the next problem / error |
Ctrl + ,Go to the previous problem / error
F4 on a variableShow type hierarchy
Ctrl + J , Ctrl + KIncremental search, find next
Ctrl + Shift + GSearch for references in the workspace

4. Run


Table 3. Running programs
Shortcut Description| Ctrl + F11 | Run last launched |
Alt + Shift + X - JRun current selected class as Java application

5. Editing


Table 4. Handling the editor
Shortcut Description| Ctrl + 1 | Quickfix; result depending on cursor position |
Ctrl + SpaceContent assist/ code completion
Ctrl + TShow the inheritance tree of the current Java class
Ctrl + OShow all methods of the current class, press Ctrl + O again to show the inherited methods.
F12Focuses on the editor (especially helpful if you work with Fast Views).
Ctrl + MMaximize Java editor
Ctrl + Shift + FFormat source code
Ctrl + Shift + OOrganize the imports; will import the missing import statements.
Ctrl + QGo to position the cursor at the last changed position in the editor.
Ctrl + Alt + ZWrap the select block of code into a block, e.g. try/catch.
Table 5. Arrow Keys
Shortcut Description| Ctrl + Left | Move one element to the left |
Ctrl + RightMove one element to the right
Ctrl + Alt + Up/DownCopy line
Alt + Up / DownMove line up / down
Alt + Shift Up / DownSelect the previous / next syntactical element
Alt + Shift Up / Down / Left / RightExtending / Reducing the selection of the previous / next syntactical element
Ctrl + Up / DownScroll up / down a line in the editor
Table 6. Delete
Shortcut Description| Ctrl + D | Deletes line |
Ctrl + Shift + DELDelete until end of line
Ctrl + DELDelete next element
Ctrl + BACKSPACEDelete previous element
Table 7. Variable assignment
Shortcut Description| Ctrl + 2, L | Assign statement to new local variable |
Ctrl + 2, FAssign statement to new field

6. Coding


Table 8. Coding
Shortcut Description| Shift + F2 | Show the Javadoc for the selected type / class / method |
Alt+Shift + N + LetterType shortcut for the command, e.g. njc to create a new Java class or npip to create a new Plugin project
Alt + Shift + ZSurround block with try and catch

7. Refactoring


Table 9. Refactoring
Shortcut Description| Alt + Shift + R | Rename |
Ctrl+2, RRename locally (in file), faster then Alt + Shift + R
Alt + Shift + TOpens the quick refactoring menu

8. Minimum

The following shortcuts are the absolute minimum a developer should be familiar with to work efficient in Eclipse.

Table 10. Must known shortcuts
Shortcut Description| Ctrl + S | Saves current editor |
Ctrl + 1Quickfix; shows potential fixes for warnings, errors or shows possible actions
Ctrl + SpaceContent assist/ code completion
Ctrl + QGoes to the last edited position
Ctrl+ DDeletes current line in the editor
Ctrl + Shift + OAdjusts the imports statements in the current Java source file
Ctrl + 2, L or FAssign statement to new local variable or field
Ctrl + Shift + TOpen Type Dialog
Ctrl + OShows quick outline of a class
Ctrl + F11Run last launched application
Ctrl + OShows quick outline of a class

Comments

Popular posts from this blog

Tenalirama: Man who bring kingdom to its knees with rice and chessboard !

DFC_DOCBROKER_EXCLUDED: Primary Docbroker Blacklisted

Enabling Mouse Cursor Recording In OBS