- CTRL + 3 is the master key to search any feature
- Alt+Shift+J to add Javadoc comment. To add a comment to a field, position the cursor on the field declaration. To add a comment to a method, position the cursor anywhere in the method or on its declaration
- CTRL + SHIFT + R to open a resource
- F3 to open declaration to dive into methods
- SHIFT and hover mouse is like F3 above, without leaving the current position
- CTRL + O gives the outline with filter to jump to methods
- CTRL + SHIFT + O – Organize imports
- CTRL + spacebar: content assist, configure this stuff:
window -> preferences -> java -> editor -> content assist
- CTRL + SHIFT + L to list all short cuts
- sysout + spacebar: content assist to insert
System.out.println()
- CTRL +1 to create local variables
- CTRL + L to go to the specified line number
- CTRL + w to close the current file,
- CTRL + SHIFT + w close all files
- CTRL + Q go to the place of last edit
- Alt + right and Alt + left for going back and forth on the history of editing path
- CTRL + D delete a line
- CTRL + SHIFT + / to comment out and un-comment a line, for a paragraph highlight the text to be commented out.
- CTRL + SHIFT + F to auto format (beautify the code)
- CTRL + SHIFT + P to find a closing brace
- CTRL + SHIFT + G to find references of the method/variable highlighted
- CTRL + SHIFT + H to find calling references of the method highlighted
- CTRL + SHIFT + T – search for type ( for example if you have an interface and you want to know who all classes have implemented them. Very helpful tool while debugging.
- Alt <- alt – > mostly used to navigate to previously opened tab.
-
CTRL + page up and CTRL + page down navigate between previously opened screen and current screen.