Sapan Diwakar

Software developer

Follow me on Twitter Check out my code on GitHub View some of my designs on Dribbble Take a look at my Linked In profile

Eclispe shortcuts that you must know as a Java Programmer

I bet you can't program on Eclispe efficiently with out using its keyboard shortcuts. As a regular Eclipse user I say thousand of times Thanks to Eclispe to provide such a rich set of keyboard shortcuts while programming. Just in case, if you are looking for a particular shortcut, you can use Ctrl+Shift+L to Show Key Assist (i.e. the Commands and their Bindings). Here goes the list of powerful shortcuts that I use excessively while working on Eclispe (Here I'm ignoring very trivial shortcuts) :

Files

Ctrl+Shift+R: Navigate to a resource; one important thing to notice here that you it also supports filtering while allowing you to type only capitalize letters. It also accepts wildcard characters :)

Alt+Shift+S: Opens source property of the file.

Ctrl+Shift+W: Closes all open files


Find:

Ctrl+L: Goto line no you want

Ctrl+H: Search in entire workspace


Debugger Shortcuts:

F5: Step into

F6: Step over

F7: Run to return

F8: Resume

ctrl+R: Run to line


Java Navigation:

Ctrl+Shift+U: Displays references to selected word in the file

Ctrl+Shift+G: Displays references to selected word in the workspace

Ctrl+Shift+Arrow Keys: Switch between fucntions


Editing:

Ctrl+Alt+Up/Down Arrow : Copies the line according to choice

Shift+Enter: Move the cursor to the next line to insert a new line

Ctrl+Shift+Up/Down Arrow: Move the cursor to the previous line/line above to insert a new line

Ctrl+Shift+Y: Convert letter to lowercase

Ctrl+Shift+X: Convert letter to uppercase

Ctrl+Shift+O: Manage your all imports

Ctrl+Shift+F: Automatically your format your code :-)

Ctrl+/: Comment the selected lines in Java files

Ctrl+\: Uncomment the selected lines in Java files

Ctrl+Shift+/: Comment the selected lines in xml, jspx files

Ctrl+Shift+\: uncomment selected lines in xml, jspx files