Eclipse Shortcut Keys & Tutorial For Increase Productivity

Eclipse Tutorial & Shortcuts For Increase Productivity Tips: In This Eclipse Tutorial Post, we are going to share the eclipse tutorial and shortcuts for freshers & experienced testers.

you can get the 30 chosen Eclipse IDE keyboard shortcuts, which will help Java developers and Java Selenium automation testers while writing the automation scripts.

It’s useful for both core Java developer and Java web application developer using Eclipse IDE for web development.

Ctrl + Shift + T for finding class even from a jar: This keyboard shortcut is my most used and favourite shortcut.

While working with a high-speed trading system that has a complex code, I often need to find classes with the just blink of the eye, and this eclipse keyboard shortcut is just made for that.

No matter whether you have a class in your application or inside any JAR, this shortcut will find it.

Ctrl + Shift + R for finding any resource (file) including config XML files: This is similar to above shortcut with the only difference that it can find out not only Java files but any files including XML, configs, and many others,

but this shortcut only finds files from your workspace and doesn’t dig at jar level.

Ctrl + 1 for the quick fix: This is another beautiful shortcut that can fix up any error for you. Whether it’s missing declaration, missing semi-colon, or any import related error, this eclipse shortcut will help you to sort that out quickly.

Ctrl + Shift + o for organizing imports: Another keyboard shortcut for fixing missing imports. Particularly helpful if you copy some code from other files and what to import all dependencies.

Eclipse Tutorial Shortcut for Quick Navigation

In this section, we will see some keyboard shortcut which helps to quickly navigate within the file and between file while reading and writing code in Eclipse.

  • Ctrl + o for quick outline going quickly to a method
  • Alt + right and Alt + left for going back and forth while editing.
  • Alt + Shift + W for the show in the package explorer
  • Ctrl + Shift + Up and down for navigating from member to member (variables and methods)
  • Ctrl + k and Ctrl + Shift +K for find next/previous

Go to a type declaration: F3, This Eclipse shortcut is very useful to see function definition very quickly.

Eclipse Shortcut for Editing Code

These shortcuts are beneficial for editing code in Eclipse.

  • Ctrl + / for commenting, uncommenting lines, and blocks, see here for a live example.
  • Ctrl + Shift + / for commenting, uncommenting lines with block comment, see here for example.
  • Selecting class and pressing F4 to see its Type hierarchy
  • Ctrl + F4 or Ctrl + w for closing current file
  • Ctrl+Shirt+W for closing all files.
  • Ctrl + l go to line
  • Select text and press Ctrl + Shift + F for formatting.
  • Ctrl + F for find, find/replace
  • Ctrl + D to delete a line
  • Ctrl + Q for going to last edited place miscellaneous Eclipse ShortcutsThese are different Eclipse keyboard shortcuts that don’t fit into any category but quite helpful and make life very easy while working in Eclipse.
  • Ctrl + T for toggling between supertype and subtype
  • Go to other open editors: Ctrl + E.
  • Move to one problem (i.e., error, warning) to the next (or previous) in a file: Ctrl +. For next, and Ctrl +, in the prior problem
  • Hop back and forth through the files you have visited: Alt + ← and Alt + →, respectively.
  • CTRL+Shift+G, which searches the workspace for references to the selected method or variable
  • Ctrl+Shift+L to view the listing for all Eclipse keyboard shortcuts.
  • Alt + Shift + j to add Javadoc at any place in a java source file.
  • CTRL+SHIFT+P to find a closing brace. Place the cursor at the opening brace and use this.
  • Alt+Shift+X, Q to run Ant build file using keyboard shortcuts in Eclipse.
  • Ctrl + Shift +F for Autoformatting.

You Can Also Refer below the image for the important Shortcut keys.

Eclipse Shortcut for Java Programmers
Eclipse Shortcut for Java Programmers

Or you can refer the below image

F10Main menu
Shift F10Context menu
Ctrl F10View menu

For navigation:

Workspace navigation
F12Activate editor
Ctrl+Shift+WSwitch editor
Ctrl F6Next editor
Ctrl + Shift F6Prev editor
Ctrl F7Next workspace
Ctrl + Shift F7Prev workspace
Ctrl F8Next perspective
Ctrl + Shift F8Prev perspective
Alt + LeftBack
Alt + RightForward

For Files:

File Handling
Alt Shift SShow in
Ctrl + Shift RJump to file
Ctrl NNew file
Ctrl SSave file
Ctrl + Shift SSave all files
Ctrl F4Close file
Ctrl + Shift F4Close all files

For Find:

Ctrl LGoto line
Ctrl FFind
Ctrl JIncremental find
Ctrl + Shift JIncremental find prev
Ctrl KFind next
Ctrl + Shift KFind prev
Ctrl HSearch workspace
Ctrl (dot)Navigate next
Ctrl (comma)Navigate prev

For Java Navigation:

Java navigation
F3Goto declaration
Ctrl + Shift UFind references in the file
Ctrl + Shift GFind references in the workspace
Ctrl GFind declarations in the workspace
Ctrl + Shift PNavigate to matching bracket/brace
Ctrl TPopup type hierarchy
Ctrl + Shift TOpen Type
Ctrl OOutline of the current source
Ctrl F3Outline of the current cursor position
Ctrl + Shift ArrowJump between methods up or down
F2Show Javadoc
F4Show hierarchy
Ctrl Alt HOpen call hierarchy

For General editing:

General editing
Alt ArrowMove line(s) up or down
Alt Shift UpExpand selection to enclosing element
Alt Shift RightExpand selection to the next element
Alt Shift LeftExpand selection to the previous element
Alt Shift DownRestore previous selection
Ctrl Alt ArrowDuplicate line(s) up or down
Shift + EnterInsert line below
Ctrl + Shift + EnterInsert line above
Ctrl DDelete line
Ctrl + Shift QToggle Quick Diff
Ctrl + Shift YConvert to lowercase
Ctrl + Shift XConvert to uppercase

For Java editing:

Java editing
Alt Shift URemove occurrence annotations
Ctrl 1Quick fix (works even when there are no errors
Ctrl + Shift MAdd import
Ctrl + Shift FReformat
Ctrl + Shift OOrganize Imports
Ctrl /Comment
Ctrl \UnComment
Ctrl + Shift SpaceParameter hints
CtrlHyperlink identifier
Ctrl ICorrect indentation
Shift SpaceIncremental content assist

For Debugger:

F5Step into
F6Step over
F7Run to return
F9Relaunch last
F11Run/debug last
Ctrl F11Run
Ctrl + Shift BToggle breakpoint
Ctrl DDisplay
Ctrl QInspect
Ctrl RRun to line
Ctrl URun snippet

For Refactoring:

Alt TRefactoring menu
Ctrl + Shift ZUndo refactor
Ctrl + Shift YRedo refactor
Alt Shift RRename
Alt Shift VMove
Alt Shift IInline
Alt Shift MExtract method
Alt Shift LExtract local
Alt Shift CChange method signature

For Misc:

F2Show resizable hover

If you want to Learn then we suggest there are some free udemy courses which will help you get more idea on Using of Eclipse. If on your organization you are using eclipse then let us know you are using and what are shortcut keys you are using for increasing the productivity.

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to, or You can join me on Linkedin.

Leave a Comment