Top list of Eclipse shortcuts used frequently :
Here is the list of top chosen shortcuts which I feel are most useful for both core Java developer and Java web application developer using Eclipse IDE for web development.
General Eclipse shortcuts :
- Ctrl + 1 for quick fix – it can fix up any error for you in EclipseWhether it’s declaration, semi-colon or any import related error, this shortcut will help you to quickly sort that out.
- Ctrl + Shift + R for finding any resource (file) including config xml filesThis Eclipse shortcut can find out not only Java files but any files including XML, configs, and many others, but this eclipse shortcut only finds files from your workspace and not dig files at jar level.
- Ctrl + Shift + T for finding class even from jarThis Eclipse shortcut finds classes with the just blink of the eye. No matter whether you have class in your application or inside any JAR, this shortcut will find it.
- Ctrl + Shift + o for organize importsAnother Eclipse keyboard shortcut for fixing missing imports. Particularly helpful if you copy some code from other file and what to import all dependencies.
Eclipse shortcuts to edit code :
- Ctrl + / for commenting, uncommenting lines and blocks.
- Ctrl + F for find, find/replace.
- Ctrl + D to delete a line.
- Ctrl + Q for going to last edited place.
- Ctrl + Shift + / for commenting, uncommenting lines with block comment.
- Selecting class and pressing F4 to see its Type hierarchy.
- Ctrl + F4 or Ctrl + w for closing current file.
- Ctrl+Shirt+W for closing all files.
- Ctrl + l go to line.
- Select text and press Ctrl + Shift + F for formatting.
Eclipse shortcuts for easy navigation :
- Ctrl + o for quick outline going quickly to method.
- Ctrl + Shift + Up and down for navigating from member to member (variables and methods).
- Ctrl + k and Ctrl + Shift +K for find next/previous.
- Go to a type declaration and press F3, this shortcut is very useful to see function definition very quickly.
- Alt + right and Alt + left for going back and forth while editing.
- Alt + Shift + W for show in package explorer.
Some other miscellaneous shortcuts for eclipse :
- CTRL+Shift+G, searches the workspace for references to the selected method or variable.
- CTRL+SHIFT+P to find closing brace. Place the cursor at the opening brace and use this.
- Alt+Shift+X, Q to run Ant build file using keyboard shortcuts in Eclipse.
- Alt+Shift+X, J to run the class file as Java Application.
- Ctrl + Shift +F for Autoformatting.
- Ctrl+Shift+L to view listing for all Eclipse keyboard shortcuts.
- Alt + Shift + j to add Javadoc at any place in java source file.
- Ctrl + E to go to other open editors.
- Ctrl + T for toggling between supertype and subtype.
Hope these shortcuts are useful for you all. if you have any additional suggestions not mentioned above then please feel free to include them in the comment section.