Eclipse Shortcuts

Filed Under: Resources

Eclipse is one of the most widely used IDE for Java developers. I have been using it for more than 10 years and there are so many shortcuts that can help you in development by saving time.

Eclipse Shortcuts

I am using Eclipse on Mac and Windows system. Here I am providing the most widely used Eclipse shortcut commands.

Note that these shortcuts are for Eclipse Juno, so some of them might not work for other Eclipse versions.

Shortcut Key MacShortcut Key WindowsDescription
Command + 3Ctrl + 3It puts the focus into Quick Access search box.
Command + SCtrl + SSave current editor
Command + 1Ctrl + 1Quickfix for errors and warnings, depends on the cursor position
Control + SpaceCtrl + SpaceContent assist and code completion
Command + Shift + FCtrl + Shift + FFormat source code
Control + QCtrl + QMoves cursor to the last edited position
Command + DCtrl + DDeletes current line in the editor
Command + Shift + OCtrl + Shift + OOrganize imports in the current java file
Command + 2 + LCtrl +2 + LAssign statement to new local variable
Command + 2 + FCtrl + 2 + FAssign statement to a field
Command + OCtrl + OShows quick outline of the java class
Command + fn + F11Ctrl + F11Runs the current opened java class if main method exists or else run the last launched application
Command + Shift + RCtrl + Shift + ROpen / Search for resources
Command + Shift + TCtrl + Shift + TOpen / Search for types, very useful in finding classes
Command + ECtrl + ETo select an editor from the currently open editors
Command + fn + F8Ctrl + F8Shortcut for switching perspectives
Command + [ or Command + ]Alt + ← or Alt + →Go to previous/ next editor position in history
Fn + F3F3Move cursor to the declaration of the variable
Command + Shift + PCtrl + Shift + PMove cursor to the matching bracket
Command + .Ctrl + .Go to the next problem
Command + Shift + .Ctrl + ,Go to the previous problem
Fn + F4F4Show type hierarchy of the variable
Command + KCtrl + KFind next for search text in the opened editor
Command + Shift + GCtrl + Shift + GSearch for references in the workspace
Command + TCtrl + TShows type hierarchy of the current java class
Command + MCtrl + MMaximize Java editor
Fn + Shift + F2Shift + F2Shows the javadoc of the method, class
Command + Option + RAlt + Shift + RRename of package, class etc
Command + Option + TAlt + Shift + TOpens the quick refactoring menu

These are the most useful eclipse shortcuts that I use every day to save time. If you know any other shortcuts please let us know through comments.


  1. Dave V. says:

    Here are some I use frequently that aren’t listed, although the refactoring items are available from the refactoring menu shown when you use Alt + Shift + T, but it requires an additional mouse click if you go that route.

    Alt + Shift + L – Extract highlighted expression to local variable.
    Alt + Shift + I – Inline highlighted variable (inverse of Alt + Shift + L)
    Alt + Shift + M – Extract method.

    Expression Selection (useful in combination with the extract/inline features):
    Alt + Shift + Up Arrow – Widens current selection to cover the next largest expression either highlighted or where the cursor is located.
    Alt + Shift + Down Arrow – Narrows current selection to cover the next smallest expression highlighted.

    Alt + Shift + S – Source menu (provides options for implementing getters/setters, etc). Equivalent to selecting Source from the menu bar, but you don’t have to click, and you can use arrow keys +enter to select an option)

  2. mani says:


  3. free tips on how to win the lottery similar web-site says:

    It’s hard to come by well-informed people about this topic, but you sound like you know what you’re
    talking about! Thanks

Comments are closed.

Generic selectors
Exact matches only
Search in title
Search in content