December 3, 2007

Top 5 Eclipse shortcuts You should know

Eclipse must know keystrokes:

  • Using Interfaces if you want to see implementation of function, instead of F3 press Ctrl – T while on the function name.
  • Open Type (Ctrl-Shift-T) should be used to open a class, and Open Resource to browse to a file. Although Open Resource can be used to open java files, Open Type shows only classes making list it a shorter list.

  • Ctrl-O in a class definition brings up Quick Outline. Start typing a member name and hit return when it’s unambiguous.

  • Ctrl-F6 can be used to switch to the editors. The order of the editors is quite user friendly as most recently used on the top. Same way Ctrl-F7 to switch to Views and Ctrl-F8 for Perspective.

  • (This one is my favorite) Shift-Alt-X T to run the unit tests in the class you are working on. This keystroke seems long but it’s logical. Shift-Alt-X for execution, Shift-Alt-D for debugging and T for unit test. Try and learn these Eclipse keystrokes to improve your programming efficiency.

9 comments:

  1. > Open Type shows only classes making list it a shorter list.

    Also, unlike Open Resource, it accepts abbreviated name lookup (i.e. type NPE to find NullPointerException, or SB to match StringBuffer, StringBuilder etc.)

    ReplyDelete
  2. Ctrl-T ... You cannot imagine how insane I become when I type F3 and I go to the interface instead of the implementation. This is going to be the most useful eclipse shortcut that I will probably ever use, after F3 of course =)

    ReplyDelete
  3. Ctrl + M for open view in full screen view

    ReplyDelete
  4. It is really fun to share your Eclipse shortcuts list :)
    There is my shortcut list
    http://voituk.kiev.ua/2007/09/24/usefull-eclipse-shortcuts/

    ReplyDelete
  5. For those that become insane :) when go to implementation rather that interface (CTRL-T, F3) look here http://eclipse-tools.sourceforge.net/implementors/

    IMO Ctrl-Alt-H (Open call hierarchy) and CTRL-1 (quick fix) are very useful.

    ReplyDelete
  6. You left off the most useful shortcut: Ctl-Shift-L it lists all of the available shortcuts.

    ReplyDelete
  7. Alt+right arrow ,used for switching to next tab.
    ctrl+M (max or min the window)

    ReplyDelete