Home » Software Development » Top 30 Eclipse Keyboard Shortcuts for Java Programmers

About Javin Paul

Javin Paul
I have been working in Java, FIX Tutorial and Tibco RV messaging technology from past 7 years. I am interested in writing and meeting people, reading and learning about new subjects.

Top 30 Eclipse Keyboard Shortcuts for Java Programmers

This tutorial is about 30 Eclipse keyboard shortcuts, this list is by no means complete and I will suggest you guys share eclipse shortcuts listed other than here to make this more useful. Eclipse is the most used Java development IDE and knowing Eclipse shortcuts not only improve your productivity but also makes you more efficient. You will have more time for things you like to do. Using keyboard shortcuts also helps to impress colleagues and shows that you have a good hold on tools you used for Java Development.

I was a big fan of Netbeans IDE before coming across Eclipse because I was from the J2ME background and Netbeans provide sophisticated IDE environment to enable you to build, debug and run your Java application in various mobile emulator including some advanced processing options e.g. preprocessing, setting up Exception breakpoint etc.

From that time I love to know keyboard shortcuts on IDEs and other tools, I used for development including Edit Plus, Microsoft Excel etc. Knowing your tool better certainly helps you to deliver more in less time and find something really quick when a production issue arise.

As I said, I was a NetBeans fan at the start of my career but hen I joined an investment bank I came across Eclipse IDE, since everybody in my team is using and Netbeans IDE was not available in company (don’t know why that was not allowed net-beans even though it was free) I have decided to go Eclipse way.

Later I found that Eclipse was most suited for that distributed core Java application which runs on Eclipse and depends upon a proprietary Linux library. It wasn’t possible to run the whole application in Windows and that time some of the cool features of eclipse e. g. Remote Debugging, Conditional Breakpoints, Exception breakpoints, and Ctrl+T and Ctrl+R kind of shortcuts really saved my life.

Here I am sharing a list of 30 Eclipse keyboard shortcuts which I found most useful and used in my day to day life while writing code, reading the code or debugging Java application in Eclipse.

30 Useful Eclipse Keyboard Shortcuts for Java Programmers

Here is my list of 30 chosen Eclipse IDE keyboard shortcuts for Java developers. It’s useful for both core Java developer and Java web application developer using Eclipse IDE for web development.

1) Ctrl + Shift + T for finding class even from jar

This keyboard shortcut in Eclipse is my most used and favorite shortcut. While working with a high-speed trading system which 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 class in your application or inside any JAR, this shortcut will find it.

2) Ctrl + Shift + R for finding any resource (file) including config xml files

This is similar to above Eclipse 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 eclipse shortcut only finds files from your workspace and doesn’t dig at the JAR level.

3) Ctrl + 1 for quick fix

This is another beautiful Eclipse shortcut which can fix up any error for you in Eclipse. Whether it’s missing declaration, missing semi-colon, or any import related error this eclipse shortcut will help you to quickly sort that out.

4) Ctrl + Shift + o for organize imports

Another Eclipse keyboard shortcut for fixing missing imports. Particularly helpful if you copy some code from other file and what to import all dependencies.

Beginners Eclipse Java IDE Training Course UDemy course

Eclipse Shortcut for Quick Navigation

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

7) Ctrl + o for quick outline going quickly to a method

9) Alt + right and Alt + left for going back and forth while editing.

12) Alt + Shift + W  to show a class in package explorer

13) Ctrl + Shift + Up and down for navigating from member to member (variables and methods)

15) Ctrl + k and Ctrl + Shift +K for find next/previous

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

Apart from these keyboard shortcuts, learning how to debug Java program in Eclipse is also a skill. There are so many debugging tools and features available in Eclipse, which many Java programmer doesn’t know e.g. conditional debugging, hit count and remote debugging.

Difference between Start and Run method in Java

Eclipse Shortcut for Editing Code

These Eclipse shortcuts are very helpful for editing code in Eclipse:

5) Ctrl + / for commenting, uncommenting lines and blocks, see here for live example.

6) Ctrl + Shift + / for commenting, uncommenting lines with block comment, see here for example.

8) Selecting class and pressing F4 to see its Type hierarchy

10) Ctrl + F4 or Ctrl + w for closing current file

11) Ctrl+Shirt+W for closing all files.

14) Ctrl + l go to line

16) Select text and press Ctrl + Shift + F for formatting.

17) Ctrl + F for find, find/replace

18) Ctrl + D to delete a line

19) Ctrl + Q for going to last edited place

Eclipse keyboard shortcuts Eclipse Remote Debugging

Miscellaneous Eclipse Shortcuts

These are different Eclipse keyboard shortcuts which doesn’t fit on any category but quite helpful and make life very easy while working in Eclipse.

20) Ctrl + T for toggling between supertype and subtype

21) Go to other open editors: Ctrl + E.

22) Move to one problem (i.e.: error, warning) to the next (or previous) in a file: Ctrl +. For next, and Ctrl +, for the previous problem

23) Hop back and forth through the files you have visited: Alt + and Alt + , respectively.

25) CTRL+Shift+G, which searches the workspace for references to the selected method or variable

26) Ctrl+Shift+L to view the listing for all Eclipse keyboard shortcuts.

27) Alt + Shift + j to add Javadoc at any place in Java source file.

28) CTRL+SHIFT+P to find closing brace. Place the cursor at the opening brace and use this.

29) Alt+Shift+X, Q to run Ant build file using keyboard shortcuts in Eclipse.

30) Ctrl + Shift +F for Autoformatting.

Remember, we are technical people, if we are not learning which means we are going backward.

And, here is the nice image to remember these useful Eclipse shortcuts for Java programmers:

Eclipse keyboard shortcuts

If you have some more useful Eclipse keyboard shortcuts then please post as comments, I will include them in this list. These Eclipse shortcuts will mostly work almost all Eclipse versions e.g. 3.5, 3.6 Helios, Eclipse Ganymede and Indigo. Let me know if you face any issue while using these Eclipse shortcuts in any particular version of Eclipse IDE.

Published on Java Code Geeks with permission by Javin Paul, partner at our JCG program. See the original article here: Top 30 Eclipse Keyboard Shortcuts for Java Programmers

Opinions expressed by Java Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
1 Comment Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Gennady Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest most voted
Notify of
Gennady
Guest
Gennady

Thanks, very nice list! I also use frequently Crtl+Alt+H to see the Call Hierarchy of specific method which for me is more useful than Crtl+Shift+G