The book about Java development using Eclipse.
Cheat Sheet Tutorial | Keyboard Shortcuts

Cheat Sheet Tutorial

An interesting addition to Eclipse is the notion of Cheat Sheets. A Cheat Sheet is a new kind of help mechanism. Where the usual help pages will inform you about something on which you need information a Cheat Sheet will walk you through the steps to accomplish a task. Out of the box Eclipse comes with 5 Cheat Sheets and you are invited to add Cheat Sheets as the mood moves you. The Cheat Sheet tutorial will walk you through the creation of a simple Cheat Sheet plug-in using just XML and then add an Eclipse action so you can see how easy it is to add programmatic support. The use of Cheat Sheet listeners is also briefly discussed.

Eclipse Keyboard Shortcuts

The following shortcuts were collected from the key bindings page from the Eclipse Preferences dialog. They represent the keyboard shortcuts I use the most. For the full list of key bindings go to Windows->Preferences->Workbench->Key. Or better yet, for a convenient Keyboard Shortcuts PDF version you can go to the Eclipse Tools Project located at SourceForge.

Workbench

F1 - Open an Infopop Help window related to the active view or editor
F4 - Open the Type Hierarchy view
Ctrl+F8 - to the next perspective
Shift+Ctrl+F8 - to the previous perspective
Ctrl+F7 - to the next view
Shift+Ctrl+F7 - to the previous view
Ctrl+F6 - to the next editor
Shift+Ctrl+F6 - to the previous editor

Ctrl+B - Build All Projects (only if enabled)
Ctrl+M - Maximize/minimize active view or editor

Ctrl+N - Open New dialog to create new projects, folders or files.

Package Explorer/Navigator Views

F2 - Rename the selected resource
F5 - Refresh the view
Alt+Enter - Open the Properties dialog for the selected resource
Alt+Shift+N - Open the New popup menu

Java Editor

File-related
Ctrl+S - Save the current open file
Ctrl+F4 - Close Active Editor
Ctrl+Shift+F4 - Close All Editors
Ctrl+P - Print the current open file

Edit Functions
Ctrl+Shift+Enter - Enter a blank line above the cursor

Ctrl+/ - Add/Re Comment
Ctrl+Shift+/ - Add a comment block
Ctrl+Shift+\ - Re a comment block

Ctrl+A - Select all of the contents of the editor
Ctrl+C - Copy
Ctrl+V - Paste
Ctrl+X - Cut
Ctrl+Y - Redo
Ctrl+Z - Undo

F2 - Show tooltip description
Ctrl+Spacebar - Content Assist
Ctrl+1 - Quick Fix
Ctrl+Shift+O - Update import statements
Ctrl+Shift+M - Add import statement for current symbol

Find/Search and Replace
Alt+Up/Alt+Down - the current line up or down
Ctrl+Alt+Up/Ctrl+Alt+Down - copy selected lines
Ctrl+F - Find and Replace
Ctrl+K - Find Next
Ctrl+Shift+K - Find Previous
Ctrl+J - Incremental Find
Ctrl+Shift+J - Incremental Find (reverse)

Navigation
F3 - Go the definition of a selected class, method or field. Opens a file if necessary
Ctrl+L - Go to line
Ctrl+Shift+P - Go to next matching bracket
Ctrl+Shift+Up - Previous member
Ctrl+Shift+Down- Next member
Ctrl+Shift+H - Open selected type in Type Hierarchy view
Ctrl+Alt+H - Open Call Hierarchy view for selected item
Alt+left - History (reverse)
Alt+right - History (forward)

Format
Ctrl+Shift+F - Format document or selected block
Ctrl+I - Correct indentation of current line or selected block.

Refactoring
Alt+Shift+R - Rename the selected resource
Alt+Shift+V - Class to a New Package
Alt+Shift+C - Change the Method Signature
Alt+Shift+I - Inline
Alt+Shift+L - Extract Local Variable
Alt+Shift+F - Convert a Local Variable to a Field

Launching
Ctrl+F11 - Run the last launched item
F11 - Run the last launched item in Debug mode