java

Eclipse: Keyboard Shortcuts List

This list contains the most common Eclipse shortcuts for Windows, Linux, and Mac OS. Using shortcuts will improve your coding efficiency. You can use this list as a reference and come back to it later when you need to.
 

Shortcuts for managing files
Windows / Linux Mac Description
Ctrl + N ⌘ + N Starts the wizard to create a new class, interface, Java project, etc.
Alt + F Open the file in Eclipse
Ctrl + ⇧ Shift + R ⌘ + ⇧ Shift + R Open a resource
Ctrl + ⇧ Shift + S ⌘ + ⇧ Shift + S Save all files
Ctrl + W ⌘ + W Close current file
Ctrl + ⇧ Shift + W ⌘ + ⇧ Shift + W Close all files
Ctrl + S ⌘ + S Save current file
Alt + ⏎ Enter Alt + ⏎ Enter Show file properties
 

Shortcuts for navigation in the eclipse editor
Windows / Linux Mac Description
Ctrl + L ⌘ + L Go to line n
Ctrl + Q ⌘ + Q Go to the last modified location
Ctrl + ⇧ Shift + Up arrow(↑) Go to the previous method
Ctrl + ⇧ Shift + Down arrow(↓) Go to the next method

 

Shortcuts for requesting information about the code
Windows / Linux Mac Description
Ctrl + T ⌘ + T Display the hierarchy of types for the selected element
Ctrl + ⇧ Shift + T ⌘ + ⇧ Shift + T Search the available types
Ctrl + ⇧ Shift + G ⌘ + ⇧ Shift + G Displays all calls of the selected method or constructor.
 

Shortcuts for formatting and comments
Windows / Linux Mac Description
Ctrl + ⇧ Shift + F ⌘ + ⇧ Shift + F Automatically format (adjust spaces, line breaks, etc.) selected. If no selection, all code is auto-formatted
Ctrl + / ⌘ + / Insert a comment //
Ctrl + ⇧ Shift + / ⌘ + ⇧ Shift + / Add a block comment around the selection /* */

 

Shortcuts to manipulate the source code
Windows / Linux Mac Description
Ctrl + Space bar ⌘ + Space bar Opens the content assistant (allows you to select methods or field names)
Ctrl + 1 ⌘ + 1 Opens a window with suggestions for solving the problem.
Alt + / Alt + / Finish a word for you. You must type at least one letter for this to work. You can use this shortcut several times on the same word until you reach the word you need.
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *