Eclipse Cheatsheet


  • 2013-08-25
  • Reference Card for Eclipse on Windows
  • #win
  • #ide
  • #eclipse

Open

Keys Action
ctrl+shift+l open list of shortcuts (2x preferences > general > keys)
ctrl+shift+r open resource..
ctrl+shift+t open type…
ctrl+shift+e open editors list
ctrl+n open new wizard

Show

Keys Action
ctrl+e show quick editor list
ctrl+o show quick outline (2x with inherited members)
ctrl+t show quick subtype hierarchy (2x supertypes)
ctrl+3 show quick access (open views etc.)

Editor > View

Keys Action
ctrl+m maximize/unmaximize current tab
ctrl+w close active editor
alt+shift+b show breadcrumbs (select last breadcrumb)
alt+shift+o show/hide mark all occurrences (focused ui)

Editor > Simple Navigation

Keys Action
ctrl+q back to last edit location
alt+←/→ backward/forward in file history
ctrl+page↓/↑ go to next/prev editing tab
ctrl+shift+↓/↑ go to next/prev methods/members (outline elements)
ctrl+./ctrl+, go to next/prev problem (error/warning)
ctrl+l go to line
ctrl+F6 move between editors
ctrl+F7 move between views
ctrl+F8 move between perspectives
ctrl+h search (Java(Package,Class,Method)/File/Plugin)
ctrl+f find/replace

Editor > Advanced Navigation

Keys Action
F2 focus on selected element (shows abstract)
F3 open declaration
F4 open type hierarchy
F5 refresh selected file
hold ctrl+click open declaration/implementation.. (while hovering object/method)
ctrl+alt+h open call hierarchy
ctrl+shift+g search references to method/object
ctrl+j incremental search in editor (just start typing>cursor moves to first occurence)

Editor > Actions

Keys Action
ctrl+space autocomplete declaration
alt+shift+s show quick source menu
ctrl+space context assist (suggest variable..CamelCase accepted)
ctrl+shift+space context information
ctrl+7 (de)commentate lines
ctrl+1 automatic actions (quick fix) for selected object/method
ctrl+i correct indentation
ctrl+shift+o organize and clean up imports of this class
ctrl+shift+f format code with line breaks etc (Preferences>Java>Code Style>Formatter)
ctrl+shift+c comment out lines
alt+shift+g generate code
??? generate getters and setters (bind this shortcut)
alt+shift+r rename and refactor all
alt+shift+l extract local variable
alt+shift+m extract method

Editing

Keys Action
ctrl+←/→ jump to next/previous words
ctrl+shift+←/→ select text to left/right by CamelCase/word
alt+shift+←/→ select text to left/right by elements
ctrl+(shift)+enter open new line below (above)
alt+↓/↑ move selected text down/up
ctrl+d delete line/selected
ctrl+shift+delete delete to end of line (eol)
ctrl+delete/backspace delete next/previous word

Debugging

Keys Action
alt+shift+x show run as menu
alt+shift+d show debug as menu
alt+shift+x, t Run as > JUnit Test (while hovering ClassTest in editor)
alt+shift+d, t Debug as > JUnit Test
ctrl+F11 run last launched application (non-debug, skips breakpoints)
F11 run last launched application in debug mode
shift+F5 step with filters
F5 step into (…method call)
F6 step over (…selected method)
F7 step return (jumps to next breakpoint)
F8 step to next breakpoint

Version Control (SVN/CVS)

Keys Action
alt+c commit (bind this shortcut)
alt+u update (bind this shortcut)