Useful Eclipse Shortcut Keys
Shortcut keys make life that little bit quicker! They aid you in
working faster and become very handy when programming in
For a full list of shortcuts, in Eclipse 3.1 and
above you can press Ctrl+Shift+L for a handy popup.
Start typing the name and the list
gets smaller. Try typing the capital letters of the class only
(e.g. type "CME" to find
Use this to look for XML files, text
files, or files of any other type. which are in your workspace.
Presents a popup window listing
currently opened files. Start typing to limit the list or simply
use the down arrow key.
Use this to find a method or a member
variable in a class. Start typing to limit the choices. Press
Ctrl+O a second time to include inherited methods.
Context sensitive content completion
suggestions while editing Java code.
If typing a method call with several
parameters use this to show the applicable parameter types. The
current parameter where the cursor is will be shown in bold.
After typing a class name use this
shortcut to insert an import statement. This works if multiple
class names haven't been imported too.
Drills down to the declaration of
the type, method, or variable the cursor is on. This works much
like a browser hyperlink.
This works like a browser's Back
This works like a browser's Forward
Go to a specific line number.
Show the type hierarchy (downward
tree) or the supertype hierarchy (upward tree).
Show where a method is called
from. In the Call Hierarchy view keep expanding the tree to
continue tracing the call chain.
Opens a search dialog with
extensive search options for Java packages, types, methods, and
Use this to rename type, method,
or field. All existing references will be refactored as
Use this to create a local
variable from the selected expression. This is useful for breaking
up larger expressions to avoid long lines.
Use this to extract a new method from
existing code. The parameter list and return type will be
Element / Restore Last Selection / Select Previous Element
Select Next Element
Useful for selecting
context-sensitive blocks (e.g. surrounding loop, method, class,
Line Up / Scroll Line Down
Very handy if you
want to scroll by 1 line without changing your cursor position or
using the mouse.
to Previous Member / Go to Next Member
stepping down through the methods of a Java source file.
Occurrences in File / Remove Occurrences Annotations
this to search within the same file - useful for occurrences of
private fields and methods.
to Matching Bracket
Helps to find the closing
bracket of lengthly if-else statements.
Find / Reverse Incremental Find
matching occurrence is shown with each typed letter. Press again
and the next matching occurrence is shown.
Line Below / Insert Line Above
Insert a line
above or below the current line.
Block Comment / Remove Block Comment
in/out blocks of code with a key stroke.
Active View or Editor
Maximize the current view
or editor at the expense of all other currently shown views. Press
again to restore to normal view.
Editor / Next View / Next Perspective
these to switch among edited files, open views and perspectives.
Lines / Copy Lines
Doesn't seem like it at first
but a great shortcut once you learn to use it. Instead of select,
copy and paste simply select and duplicate without affecting the
This is excellent for code editing or
writing plain help files with variables and other words having no
English language equivalents. The word completion is based on the
set of words already present in the current file.
Select a block of Java code or an
entire class file and use this shortcut to correct its