Eclipse - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Eclipse Shortcuts

Eclipse Shortcuts

shape Introduction

This chapter Eclipse Shortcuts demonstrate the key board shortcut in detail. Eclipse got designed with a bunch full of short cuts so that user can easily work while programming. Following are the concepts covered.
  • Shortcut Keys
  • List of Shortcut Keys

Shortcut Keys

shape Description

Eclipse is a Graphical User Interface (GUI) oriented IDE which contains a bunch full of useful shortcut keys, many developers make use of shortcut keys while programming in order to increase the productivity. In order to get a quick outline view use Control + O shortcut key, user may notice that down at the bottom of the explored window it show inherited members, press Control + O again in order to view more things as shown in the image below. The image shows an example of a pop-up dialog and where Eclipse puts additional shortcuts. So, make sure while opening a pop-up dialog to take a look around and also see for some additional meaningful shortcuts. User may also notice hovering over the buttons will show up shortcut keys for those buttons in the toolbar. Use Alt+Left to go back and Alt+Right to go forward. The Previous Annotation is also useful and a lot of people like to change these so that only errors and warnings show up in the annotations which can be done by using shortcuts Control+. and Control+,. So, using a combination of Control+, and Control+. user can navigate through the errors. When a bunch full of tabs got opened user may hit Control + E to show up the files instead of going to show list icon and clicking it to view. The image below show the list of opened files in editors tab after hitting Control + E.

Shortcut for comprehensive list

shape Description

Some version of Eclipse Provided with a shortcut combination Control+Shift+L which will brought up a comprehensive list of all the shortcuts, by using this button combination will provided a nice long list containing about 130 to 200 shortcut keys as shown in the image below. Down near the bottom of explored window user can see there is another press Control+Shift+L to open the preferences pane. So, by using the combination for couple of times will open up a popup window providing Keys Preference settings as shown in the image below. Now, user can review or change all the key bindings.

List of Shortcut Keys

shape Description

Make a habit of using Shortcut keys frequently while programming in Eclipse in order to increase the productivity, the great thing is that Eclipse got built with a set of helper keys, the table below provides some important and most used Short keys in Eclipse.
Shortcut Description
Ctrl + E A file editor get opened within the list of all open files.
Ctrl + Shift + R Open's Resource
Alt + Used to go back to previous or next edit location from editors history.
Ctrl + Page + Up or Page + Down The past and previous files get explored within the list of open files.
Ctrl + O All the class methods get listed.
Ctrl + Space Type assist
Ctrl + Shift + F Used for formatting the code
Ctrl + Shift + O Used to organize imports
Ctrl + Shift + U Used to locate reference in a file.
F3 Navigate to the variable declaration.
F4 Display the type hierarchy of a class.
Shift + F2 Used to display the Javadoc for the current element.
Ctrl + / Used for writing comments
Ctrl + T Used to display the tree of current token.
F12 Current Editor get focused.
Ctrl + Shift + P Navigate to the matching parenthesis.
Ctrl + L Used for line number
Crtl + D A line get deleted.
Ctrl + The element get moved to left or right.
Ctrl + M Used to Maximize the editor.
Crtl + 1 Used to fix the code quickly
F6 Used to step over.
F5 Used to step into.
F8 Used for Resume.
Ctrl + . or ctrl + , Used to display the previous or next errors.
Ctrl + F11 Used to run the program which got run at the last time.
Ctrl + Shift + G Scan for current cursor situated word reference in workspace.
Ctrl + H Scan Java in workspace.

Summary

shape Key Points

  • Using the shortcut keys will increase the productivity.
  • Eclipse contain nearly 130 to 200 shortcut keys.
  • In order to view the comprehensive list of keys hit Ctrl + shift + L.