Friday, November 4, 2011

Eclipse short cut keys


Highlighted the most useful shortcut keys.

1. Navigation
Shortcut Description
CTRL + SHIFT + R Open / Search for resources, e.g. files
CTRL + SHIFT + T Open / Search for Types
CTRL + E Allows to select an editor from the currenlty open editors
CTRL + F8 Shortcut for switching perspectives
ALT + LEFT ARROW KEY or ALT + RIGHT ARROW KEY Go to prev/ next editor position in history
Ctrl-PageUp/PageDown Previous/next tab
F3 Go to declaration of this variable
CTRL + SHIFT + P Go to matching bracket
CTRL + Q Go to editor area and position the cursor at the last changed position

2. Search
Shortcut Description
Ctrl + . Go to next problem
Ctrl + , Go to previous problem
F3 on a variable Goto Declaration of this variable
F4 on a variable Show type hierarchy
CTRL + J , CTRL +k Incremental search, find next
CTRL+ SHIFT +k Decremental search,find previous
CTRL + SHIFT + G Search for reference in the workspace

3. Run
Shortcut Description
Ctrl F11 Run last launched
Alt + Shift + X - J Run as Java application

4. Editing
Shortcut Description
CTRL + 1 Quickfix, dependend on cursor position. See Quickfix for details.
CTRL + Space Content assist/ code completion, see Content Assist for details.
CTRL + T Show inline inline inheritance tree of the current Java class
CTRL + O Show inline all methods of the current class, press CTRL+O again to show the inherited methods
F12 Focuses the editor (especially helpful if you working with Fast Views
Ctrl + M Maximize Java editor
CTRL + Shift + F Format source code
CTRL + Shift + O Organize the imports / Will import the missing imports.
CTRL + Q Last edited position

5. Arrow Keys
Shortcut Description
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

6. Delete
Shortcut Description
Ctrl + D Deletes line
CTRL + SHIFT + DELETE Delete until end of line
CTRL + DELETE Delete next element
CTRL + BACKSPACE Delete previous element

7. Variable assignment
Shortcut Description
Ctrl + 2 + L Assign statement to new local variable
Ctrl + 2 + F Assign statement to new field

8. Programming
Coding
Shortcut Description
Shift + F2 Call the Javadoc for the selected type / class / method
Alt+Shift + N + Letter Type shortcut for the command, e.g. njc to create a new Java class or npip to create a new Plugin project.
Alt + Shift + Z Surround block with try and catch

9. Refactoring
Shortcut Description
ALT- SHIFT +R Rename
CTRL+2,R Rename locally (in file), faster then ALT- SHIFT +R
ALT- SHIFT + T Opens the quick refactoring menu

10. Debugging
Shortcut Description
F11 Debug last run
Ctrl + Shift + B Toggle breakpoint
F5 Single Step (Down)
F6 Single Step (Jump)
F7 Up

1 comment: