Eclipse - Tips & Tricks

Advertisements


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 pressing 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 pressing 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.


Advertisements
Advertisements