August 14, 2013

Eclipse shortcuts

There's already tons of posts dealing with this, but I don't care and I'll share my favourite eclipse shortcuts anyway :

Ctrls ^^
Ctrl + Space => completion
Ctrl + T => show implementations for an interface method
Ctrl + Shift + O (the letter)=>organise imports
Ctrl + Alt + H => lookup call hierarchy for this method or attribute
Alt + Shift + X, then J => Run a java class containing a main method
Alt + Shift + X, then T => Run junit tests in current class
Alt + up or down arrow => move a line up or down
Alt + left or right arrow => go to last edited location
Ctrl + Alt + up or down arrow => duplicate current line and copy it above or below
Ctrl + page up or page down => move from one tab to another. Really useful, except when you hit the bloody xml editor in your tabs...
Ctrl + L => goto line number ....
Ctrl + Shift + L => pops up the shortcut list
Alt + Enter => Access file properties. Useful to check file encoding, or check version control file URL
Ctrl + Shift + R => Open File
Ctrl + Shift + T => Open Type. Useful to find a class in a jar for example
Ctrl + W => Close file
F12 => Go to editor view
Ctrl + M => maximize/minimize current editor
Ctrl + 1 => show quickfix. has the same effect as hovering over an error with the mouse
Ctrl + E => display list of opened editors
Ctrl + Shift + F => Format code
Ctrl + I => Indent code
F3 => open déclaration
F4 => open hierarchy
Alt + Shift + R => rename field
Alt + Shift + T => show refactor menu

I usually also create a binding for the "generate getters and setters" action.

Please feel free to propose new ones if you feel like I've forgotten important ones.

No comments:

Post a Comment