Cheatsheet Eclipse
IDE popular para Java e outras linguagens
Eclipse
file
New
Ctrl + N
Creates a new resource (class, project, etc.).
Editor list
Ctrl + E
Shows the open editors.
Save
Ctrl + S
Saves the current file.
Save all
Ctrl + Shift + S
Saves all open files.
Close editor
Ctrl + W (or Ctrl + F4)
Closes the active tab.
Edition
Undo / Redo
Ctrl + Z (undo)
Ctrl + Y (redo)
Reverts or reapplies actions.
Comment line
Ctrl + /
Comments or uncomments the line.
Uppercase / lowercase
Ctrl + Shift + X (UPPERCASE)
Ctrl + Shift + Y (lowercase)
Converts the text case.
Delete line
Ctrl + D
Removes the current line.
Comment / uncomment block
Ctrl + Shift + / (comment)
Ctrl + Shift + \ (uncomment)
Comments blocks of code.
Move line
Alt + ↑ (up)
Alt + ↓ (down)
Moves the current line.
Format code
Ctrl + Shift + F
Formats the code according to the style.
Duplicate line
Ctrl + Alt + ↑ / ↓
Duplicates the current line.
Fix indentation
Ctrl + I
Indents the lines correctly.
Navigation
Open type
Ctrl + Shift + T
Opens a class/interface by name.
Open declaration
F3 (or Ctrl + Click)
Jumps to the symbol definition.
Open resource
Ctrl + Shift + R
Opens any file in the workspace.
Type hierarchy
F4
Shows the class hierarchy.
Quick outline
Ctrl + O
Lists the members of the current class.
Navigation history
Alt + ← (back)
Alt + → (forward)
Navigates through the position history.
Go to line
Ctrl + L
Jumps to a line number.
Search
Search in file
Ctrl + F
Opens search in the editor.
Find references
Ctrl + Shift + G
Finds where the symbol is used.
Search in workspace
Ctrl + H
Opens the global search.
Incremental search
Ctrl + J
Searches the you type.
Next occurrence
Ctrl + K
Jumps to the next occurrence.
Code and Refactoring
Autocomplete
Ctrl + Space
Shows suggestions (content assist).
Extract variable
Shift + Alt + L
Creates a variable from the selection.
Quick fix
Ctrl + 1
Shows quick fixes for the error.
Organize imports
Ctrl + Shift + O
Organizes and cleans up the imports.
Rename
Shift + Alt + R
Renames the symbol across the whole project.
Generate code
Shift + Alt + S
Generates getters, setters, constructors, etc.
Extract method
Shift + Alt + M
Turns the selection into a method.
Execution and Debugging
Run
Ctrl + F11
Runs the last configuration.
Continue
F8
Resumes execution until the next breakpoint.
Debug
F11
Starts debugging.
Toggle breakpoint
Ctrl + Shift + B
Adds or removes a breakpoint.
Step into
F5
Steps into the called function.
Step over
F6
Runs the line without stepping in.
Views
Quick access
Ctrl + 3
Opens views and commands by name.
Maximize editor
Ctrl + M
Maximizes the current editor.
Switch perspective
Ctrl + F8 (next)
Ctrl + Shift + F8 (previous)
Switches between perspectives.
Console view
Alt + Shift + Q, C
Opens the console view.