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.
Read Also: SVN interview questions
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.
Check Also: Telephonic Interview Tips
You Can Also Refer below the image for the important Shortcut keys.
Or you can refer the below image
|Shift F10||Context menu|
|Ctrl F10||View menu|
|Ctrl F6||Next editor|
|Ctrl + Shift F6||Prev editor|
|Ctrl F7||Next workspace|
|Ctrl + Shift F7||Prev workspace|
|Ctrl F8||Next perspective|
|Ctrl + Shift F8||Prev perspective|
|Alt + Left||Back|
|Alt + Right||Forward|
|Alt Shift S||Show in|
|Ctrl + Shift R||Jump to file|
|Ctrl N||New file|
|Ctrl S||Save file|
|Ctrl + Shift S||Save all files|
|Ctrl F4||Close file|
|Ctrl + Shift F4||Close all files|
|Ctrl L||Goto line|
|Ctrl J||Incremental find|
|Ctrl + Shift J||Incremental find prev|
|Ctrl K||Find next|
|Ctrl + Shift K||Find prev|
|Ctrl H||Search workspace|
|Ctrl (dot)||Navigate next|
|Ctrl (comma)||Navigate prev|
For Java Navigation:
|Ctrl + Shift U||Find references in the file|
|Ctrl + Shift G||Find references in the workspace|
|Ctrl G||Find declarations in the workspace|
|Ctrl + Shift P||Navigate to matching bracket/brace|
|Ctrl T||Popup type hierarchy|
|Ctrl + Shift T||Open Type|
|Ctrl O||Outline of the current source|
|Ctrl F3||Outline of the current cursor position|
|Ctrl + Shift Arrow||Jump between methods up or down|
|Ctrl Alt H||Open call hierarchy|
For General editing:
|Alt Arrow||Move line(s) up or down|
|Alt Shift Up||Expand selection to enclosing element|
|Alt Shift Right||Expand selection to the next element|
|Alt Shift Left||Expand selection to the previous element|
|Alt Shift Down||Restore previous selection|
|Ctrl Alt Arrow||Duplicate line(s) up or down|
|Shift + Enter||Insert line below|
|Ctrl + Shift + Enter||Insert line above|
|Ctrl D||Delete line|
|Ctrl + Shift Q||Toggle Quick Diff|
|Ctrl + Shift Y||Convert to lowercase|
|Ctrl + Shift X||Convert to uppercase|
For Java editing:
|Alt Shift U||Remove occurrence annotations|
|Ctrl 1||Quick fix (works even when there are no errors|
|Ctrl + Shift M||Add import|
|Ctrl + Shift F||Reformat|
|Ctrl + Shift O||Organize Imports|
|Ctrl + Shift Space||Parameter hints|
|Ctrl I||Correct indentation|
|Shift Space||Incremental content assist|
|F7||Run to return|
|Ctrl + Shift B||Toggle breakpoint|
|Ctrl R||Run to line|
|Ctrl U||Run snippet|
|Alt T||Refactoring menu|
|Ctrl + Shift Z||Undo refactor|
|Ctrl + Shift Y||Redo refactor|
|Alt Shift R||Rename|
|Alt Shift V||Move|
|Alt Shift I||Inline|
|Alt Shift M||Extract method|
|Alt Shift L||Extract local|
|Alt Shift C||Change method signature|
|F2||Show 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.