Eclipse Tutorial on Eclipse Tips & Tricks

tip #1 − discovering shortcut keys

  • press ctrl + shift + l to open a widget that shows all the shortcut keys.

tip #2 − content assist

  • in the java editor press ctrl + space to see a list of suggested completions. typing one or more characters before clicking ctrl + space will shorten the list.

tip #3 − parameter hint

  • when the cursor is in a method argument, press ctrl + shift + space to see a list of parameter hints.

tip #4 − camel case support in code completion

  • code completion supports camel case patterns. entering npe and clicking ctrl + space will propose nullpointerexception and nopermissionexception.

tip #5 − creating getters and setters

  • click on source → generate getter and setter to open the wizard that allows you to generate getter and setter methods.

tip #6 − generating hashcode() and equals() methods

  • click on source → generate hashcode() and equals() to generate this methods for a java class.

tip #7 − adding code around a block of code

  • select a block of code and press alt+shift+z to see a menu of items like if statement, for loop, try/catch etc that can enclose the selected block of code.

tip #8 − locating a matching bracket

  • select an opening or closing bracket and press ctrl+shift+p to find its matching bracket.

tip #9 − smart javadoc

  • type '/**' and press enter to automatically addes a javadoc comment stub.

tip #10 − organizaing imports

  • press ctrl+shift+o to organize all the imports.

tip #11 − activating the menu bar

  • press f10 to activate the menu bar.

tip #12 − making a view/editor active

  • press ctrl+f7 to see a list of open views and editor area and switch to one of them.