Top 10 Eclipse Hotkeys

Eclipse has lots and lots of hotkeys, but for daily work you need only a small subset. This are the hotkeys I consider to be the most important time savers:

Moving around

  • Ctrl+J — Incremental Search
  • Ctrl+Shift+T — Search a type, with search on typing. You can use only the upcase letters (e.g. type “MIL” to find MouseInputListener)
  • Ctrl+F6 — Switch between last used files
  • F3 — Open declaration
  • Ctrl+Alt+H — Open Call Hierarchy

Editing

  • Ctrl+1 — Quick Fix: press while cursor is positioned at member variable, parameter, selection, warnings, errors, …
  • Ctrl+Space — Context Assist: press after a ., or to use macros (for, while, sysout, …). Press in class-scope to automatically create method declarations.
  • Ctrl+Shift+O — Organize Imports
  • Ctrl+Shift+F — Reformat source
  • Alt+Shift+T — Show Refactor Quick Menu

In case these hotkeys are not enough or you have forgotten which hotkey does what, you can always press Ctrl+Shift+L to get a nice list of all the hotkeys.

28 thoughts on “Top 10 Eclipse Hotkeys

  1. Pingback: The Rashad’s Zone » Organization For Eclipse Developers

  2. Besides the ones above I also use very frequently:

    Alt+Shift+S: show the Source menu (the little brother of Alt+Shift+R)

    Ctrl+Shift+R: search for a Resource (the bigger brother of Ctrl+Shift+T which I summon if I e.g. look for a XML file)

    Alt+Shift+Up: Expand Selection to enclosing element (saves me many times from leaving the keyboard to grab the mouse)

  3. F3 is a very nice one as well. Put the curser over some method and it will bring you to its declaration.

  4. It’s not native to Eclipse, but the Implementors plugin gives you Alt-F3, which takes you to the _implementation_ of the item under the cursor. So instead of taking you to List.add(), it would offer you the choice of ArrayList.add() and LinkedList.add(). If there’s only one choice, it jumps straight to it.

  5. Pingback: Myndian.de

  6. On Windows-Machines, change Ctrl+F6 (Switch between last used files) to Alt-q. So it is close to Alt-Tab (Win: Switching Programms) This tip is from E.Gamma (i meet him at the JAX)

  7. It is nice to rename something at once everywhere in a file (Ctrl + 2, R).
    Running JUnit/PDE test (Alt + Shift + X, T)/(Alt + Shift + X, P).

  8. CTRL+J is great for incremental find. Did you know you can press it twice to search again for the search term you used before?

  9. Pingback: .bootstrap » Top 10 Eclipse Hotkeys

  10. Hi Martin : Its a very good list too. Ya….as you said we probably we need to collate rest of the popular shortcuts and add them to TOP 100 :) . But its really interesting to see which shortcuts are frequently used by others.

  11. Eclipse is a very popular Java development environment, IDE and it has a lot hotkeys to remember. Here is a blogger’s day to day use top 10 eclipse hotkeys.

  12. Thanks a lot. Without your post I would have probably still believed that Eclipse is not suited for serious work. I am actually a C++ programmer and a casual Eclipse user.

    When I press ctrl+shift+f6 and see the explanation that ctrl + F6 is the “Next Editor” for me it is difficult to guess that this actually means the list of opened windows (most often in the same editor).

  13. Pingback: Martin Ankerl » Blog Archive » Top 10 Posts of 2008

  14. Hey Chetan,

    Switching tabs firefox-style can be done with . I would suggest going into Window>Properties>General>Keys to change the hotkey to like it is in most Linux applications.

  15. Excellent and very helpful Post .
    thanx much
    hello sir , can u please tell me , one short cut ,

    if i want to compile a single .cpp or .c file in Eclipse ,
    is thr any shortcut available for it ?
    or else then short cut also if any method available in eclipse..
    please tell me .

    Thanx to All in Advance.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>