Hey, tea lovers! Today we will talk about the Eclipse IDE, an Open-source & Powerpack IDE. Believe it or not, almost every Java Developer has used this IDE . In fact, in most organizations, you will find that developers are using Eclipse IDE. Its extensive plugins & customization add-on system makes it easy to use and enhances the developer experience.
In the market, we have many IDE’s but eclipse provides all the functionality free of cost, unlike IntelliJ IDEA. It supports and distributes many languages along with Java, such as C/C++, PHP, etc. So having hands-on Eclipse makes it easy for code in any language without changing IDE.
Now let’s look at the shortcuts in Eclipse IDE. This makes you more productive since you don’t have to leave your keyboard and point out the direction to click via mouse. Few of these shortcuts are very important and others are used not that frequently. To be honest, You don’t gotta catch them all. We will take a look shortcuts which you will require more often than others.
IF you are using IntelliJ IDEA, you might want to check out this post.You Only Need These 7 IntelliJ IDEA Shortcuts to Skyrocket Your Productivity
Let’s just jump right into it & explorer shortcuts. But before prepare your cup of tea to sip and learn.
Show Proposals : Ctrl + Space
This shortcut will show all available proposals/options for the selected class & method. This gives you more information on how many implementations are available. There are different proposals available in eclipse so you can jump to the next proposal by pressing the same keys again.
When there are many files and packages you don’t want to search manually and look for the file you need. You can use following shortcut to do that for you.
Ctrl + Shift + R : Search Resource dialog to open files by name or path.
Ctrl + H : Search Widget to help search anything in workspace
Ctrl + O : In Java file it will help to search in method and variable
Show View : Alt + Shift + Q
On the bottom of Eclipse IDE, we have many tabs as Error Log, console, search, etc. At the time of coding, we often switch between these tabs. It’s very annoying to use the mouse every time to switch between them. Hold down Alt + Shift + Q then release, it will show the list and select the one you like to open.
Organize Import : Ctrl + Shift + O
Import statements can get cluttered sometimes. This shortcut will clean it for you. If there is any unused import in the file then it will get removed. Also, if there is any missing import statement, then it will get added to the file assuming there are no multiple classes with same name.
Code Editor Shortcuts
Working with the editor, we need to perform many operations along with the typing. So I decided to divide them according to their use. Let’s look at them one by one.
Ctrl + W : Closes the currently active code editor
Ctrl + Shift + W : Closes all opening code editors
Navigate In Editor
Alt + left : Editor going left or backward by word by word on a line
Alt + right : Editor tab going right or forward by word by word on a line
Ctrl + Shift + Up: Navigate to the upward direction in Editor by variables and methods
Ctrl + Shift + Down : Navigate to the downward direction in Editor by variables and methods
Ctrl + K : Select on any string & then press Ctrl + K, & On each press, it will navigate to the next match.
Ctrl + Q : Navigate to the last edited place
Ctrl + 1 : Quick Fix option for that selected part
Ctrl + E : It open dialog for all open active editor to navigate
Ctrl + Shift + P : To find closing & opening brace for that code.
Ctrl + L : On hit this shortcut in editor it will ask for a line of code where you have to go
Other Shortcut In Editor
Ctrl + D : Delete current line
Ctrl + Shift + F : Format code in current open editor
Ctrl + Shift + G : Searches the workspace for references to the selected method or variable
Alt + Shift + J : To add Java-doc in Java source file
Alt + Shift + S + R : First click on Alt + Shift + S, It will open dialog than press S than Generate getter and setter methods
Alt + Shift + R : Rename selected method or variable occurrence in all dependent places
Alt + Shift + L : selected variable Extract to new Local Variable
Alt + Shift + M : selected portion of code Extract to new Method
Ctrl + / : – toggle for Comment/Uncomment selected code portion
Forgot the shortcuts?
In case you forgot the shortcut simply press Ctrl + Shift + L. the popup window that will contain a complete list of shortcuts available in Eclipse IDE will appear.
And the final note
As I said, there are countless other shortcuts in the Eclipse IDE, but this some of the lists of shortcuts that I use commonly But you can go beyond this & learn as many shortcuts as possible, also don’t forget to check Intellij shortcut here You Only Need These 7 IntelliJ IDEA Shortcuts to Skyrocket Your Productivity. How many shortcuts to learn? well until you can do the following.
You should be able to code without touching the mouse.
That’s it guys for this post. Tell me if these shortcuts are enough or you would like to add more. If you have more shortcuts or you want to add more with your comments, Till that you can check posts on best practices to boost your performance. & for our latest post subscribe to our social media handle from there we will keep you update, See you at your next tea time.