Eclipse Shortcuts for Java Development
Code Completion and Assistance
Ctrl
+Space
: Content Assist (auto-completes code).Ctrl
+Shift
+Space
: Code assist (for method parameter hints).
Navigation
Ctrl
+Shift
+T
: Open Type (search for a class, interface, or enum).Ctrl
+O
: Quick Outline (view methods and fields of the current class).F3
: Go to Declaration (navigate to the definition of a variable, method, or class).Ctrl
+Shift
+R
: Open Resource (search for any file in the workspace).Alt
+Left Arrow
: Go to Previous Navigation Location.Alt
+Right Arrow
: Go to Next Navigation Location.
Refactoring
Alt
+Shift
+R
: Rename (rename variables, methods, or classes).Alt
+Shift
+M
: Extract Method (refactor code into a method).Alt
+Shift
+C
: Change Method Signature.Ctrl
+1
: Quick Fix (apply quick fixes for problems in code).
Code Editing
Ctrl
+D
: Delete Current Line.Ctrl
+Shift
+F
: Format Code (auto-format code according to style).Ctrl
+/
: Toggle Line Comment (comment or uncomment the current line).Ctrl
+Shift
+/
: Toggle Block Comment (comment or uncomment a block of code).Ctrl
+Shift
+L
: Show Keyboard Shortcuts (list all shortcuts available in Eclipse).
Debugging
F5
: Step Into (debug step into the method call).F6
: Step Over (debug step over the method call).F7
: Step Return (debug step out of the current method).F8
: Resume (continue execution until the next breakpoint).Ctrl
+Shift
+B
: Toggle Breakpoint (set or remove a breakpoint).Ctrl
+F2
: Terminate Debugging (stop the debug session).
Project Management
Alt
+Shift
+N
: New (create a new file, class, etc.).Ctrl
+F11
: Run Last Launched Application (run the most recent application).Alt
+Shift
+F
: Find References (search for all references to the selected element).
General
Ctrl
+E
: Switch Between Open Editors (cycle through open files).Ctrl
+Shift
+E
: Show Open Editors (list all open editors).Ctrl
+Shift
+P
: Show Matching Bracket (navigate to the matching parenthesis or bracket).
Search and Replace
Ctrl
+H
: Open Search Dialog (search in the workspace).Ctrl
+Shift
+F
: Format Source Code.Ctrl
+R
: Replace (find and replace in the current file).
Working with Code
Ctrl
+Shift
+A
: Show the context menu for actions available in the current selection.
Terminal and Console
Ctrl
+Shift
+C
: Show Console (open the console view).
Additional Tips
- Custom Shortcuts: You can customize and create new shortcuts in Eclipse by going to
Window
>Preferences
>General
>Keys
.
These shortcuts can help you navigate, refactor, and code more efficiently in Eclipse, making your development process smoother and more productive.
Tags
Eclipse Shortcuts