Eclipse Shortkeys

11
Shortcut keys for Eclipse IDE Scope of this document: In the world of Rapid Application Development, we need to spend more time with keyboard than with mouse, so as to write more code and leveraging the features of any IDE to its maximum. In this document I am presenting some of the shortcut key combinations that I have worked with. 1. Ctrl+Shift+F: Shortcut used for formatting the code. The formatting rules provided by default can be changed by navigating to the location Windows Preferences Java Code Style Formatter Created by Santosh Kothapalli http://www.javacontractors.blogspot.com/

Transcript of Eclipse Shortkeys

Page 1: Eclipse Shortkeys

Shortcut keys for Eclipse IDE

Scope of this document: In the world of Rapid Application Development, we need to spend more time with keyboard than with mouse, so as to write more code and leveraging the features of any IDE to its maximum. In this document I am presenting some of the shortcut key combinations that I have worked with.

1. Ctrl+Shift+F: Shortcut used for formatting the code. The formatting rules provided by default can be changed by navigating to the location Windows Preferences Java Code Style Formatter

Created by Santosh Kothapallihttp://www.javacontractors.blogspot.com/

Page 2: Eclipse Shortkeys

We can implement most of the formatting components by clicking on the edit

2. Ctrl+Shift+O: Organizes the imports, removes the unwanted imports. When you first try to include any class and your editor shows an error in red, just use this key combination to get rid of it. If the Class is available in more than one package all the occurrences re listed.

Page 3: Eclipse Shortkeys

3. Ctrl +O: Lists all the variables and methods available in a particular class

4. Ctrl+T: Lists all the implementation classes of a particular interface. Example if you open the class List and use this key combination, lists all possible implementations available in the class path.

Page 4: Eclipse Shortkeys

5. Ctrl+Shift+T: Open Type? What is this, don’t be bothered, it just lists all the classes available in its class path, it works as a pattern based search.

6. Ctrl+Shift+G: Key combination is very useful as it lists down the hierarch from where this method is called; this key combination has to be used when the name of the method is selected. If you use this combination selecting the name of the class; lists all the classes where the reference of this class is used. Equivalent to java search.

Page 5: Eclipse Shortkeys

7. Ctrl+N: Opens a New Wizard, suppose if you want to create a new class, instead of navigating to New Others, use this combination.

8. Ctrl+Alt+H: Call hierarchy, without actually debugging the code, tries to understand the logical flow

Page 6: Eclipse Shortkeys

9. Ctrl+F8: Moving across the perspectives, say if you are in java perspective and would want to navigate to Debug environment, press and hold the key combination , can be navigated up and down to switch between the perspectives

10. Ctrl+L: Go to the specified line number in a class.

11. Ctrl+F: Find and replace a word

Page 7: Eclipse Shortkeys

12. Ctrl+E: Lists all the classes than are opened and not displayed in the perspective, can say as explorer shows all the folders, this combination lists all the classes available in the hierarchy.

13. Ctrl+M: Maxmizes or Minimizes the current window

14. Ctrl+I: Corrects the inundation, but don’t forget to select the entire code using Ctrl+A before using this key combination

15. Ctrl+Shift+B: This key combination will be useful for either inserting/removing of a breakpoint, in short toggle breakpoint.

16. Ctrl+F11: Run your code, using this combination

17. Alt+Shift+J: Adds the java documentation to a variable, method and Class

18. Ctrl + B: Builds the selected java project

19. Alt+Shift+R: Refractor rename, renames all the occurrences in the project

Page 8: Eclipse Shortkeys

20. Alt+Shift+L: Opens a windows which displays all the shortcuts available and the shortcuts that are imported when the new plug-in are downloaded and more

Page 9: Eclipse Shortkeys

User Defined Short cut combinations:

We can always add the short cut keys by navigating to Windows Preferences Keys