My eclipse shortcuts and tweaks

In a project where requirements change on a daily basis, refactoring is one’s biggest friend.
I’m currently in such a project – not my kind of thing but reality sometimes sucks.
Anyhow, I’ve tried to look at it from the bright side.

I’m currently perfecting my refactoring skills in eclipse.

Here’s what I can share.

Everybody knows about

Ctrl + Shift + R – find resource (file )
Ctrl + Shift + T – find type (class)

Alt+Shift+C – Change method signature

Alt+Shift+S – Context menu for source generation.


Alt+Shift+X, J
– Launch current focused code as Java Console App
Alt+Shift+D, J – Debug current focused code as Java Console App
Ctrl + L – go to line – when watching stack traces. NEW
Ctrl + O – find method in class.   NEW
Ctrl + T – Hierarchy of a class (subclasses + base classes).   NEW

But do you know these:
Alt+Shift+X, Q – Launch current focused script as an Ant Build Script (focused on a target in the ‘Outline’ window launches only that target, very handy)
Ctrl + >, Ctrl + < – Navigates through warnings and errors in a source file. Extremely handy.

Ctrl + 1 – launches the solution box or whatever that’s called.
Ctrl + 3 – finds any window.
Middle button closes tabs as in browsers (only IE does not do that) – VERY, VERY COOL. Ganymede (Eclipse 3.4) only.
Ctrl + E – list of all the open windows (by Joke). NEW
Ctrl + J – incremental search (like Ctrl + F, F3 in browsers (real browsers, IE can’t do that)), then arrow up/down to go to next previous, Enter to stop (by rado). NEW

Ctrl + Shift + / – collapse all. NEW2
Ctrl + Shift + * – expand all. These are very nice in long classes. NEW2

Debugging
Ctrl + Shift + I – inspect selected source code while debuging.
The ‘Display’ window is my biggest friend – inside it you can write code and evaluate it with Ctrl + Shift + D (print result in the box) and Ctrl + Shift + I ( inspect the code in a context window.

That’s for now, I’ll update this regularly. If someone uses something regularly that is not here, please tell.

3 thoughts on “My eclipse shortcuts and tweaks”

  1. Ctrl + Shift + F – Source Formatting. when line length and other properties configured properly, code often uses to look a bit cleaner and standardized.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.