Man, I’m such an impatient guy. I cringe whenever I see somebody squint and frown, looking for a JSP file in Eclipse by browsing painfully through the gazillion JSPs in multiple folders in the Package Explorer. I squirm whenever I see somebody looking for a Java class by clicking through packages, one by one, backtracking if it’s the wrong package, and so on, until he sees the correct Java class.
I mean, any resource in the workspace is literally seconds away. Ditto to classes (and interfaces, and members, and so on). Why waste time and brain cycles to wade through countless lines in countless files? I thought that every Eclipse user knows this, in fact, if you’re reading this, most probably you already know this too. But thousands of Eclipse JDT users who never bother to read tech blogs in all probability will also never bother to find out what Eclipse can do for them. And it’s a pity, really, because they’re really missing out a lot. So maybe if you know one, you can forward this to them or something. Make them more productive or something, ya know. 30 seconds saved for every file can add up to really a lot!
So without further ado, let’s say you want to:
- Open any file quickly without browsing for it in the Package Explorer: Ctrl + Shift + R. This shortcut opens a dialog box that accepts the name of the file you’re looking for. It even accepts wildcard characters, yo. Typing *-conversion.properties will give you the list of all files that ends with -conversion.properties. So everytime you want to open a file–stop that hand from going to the mouse, and press Ctrl + Shift + R instead!
- Open a type (e.g.: a class, an interface) without clicking through interminable list of packages: Ctrl + Shift + T. If what you want is a Java type, this shortcut will do the trick. Unlike the previous shortcut, this even works when you don’t have the Java source file in your workspace (e.g.: when you’re opening a type from the JDK).
- Go directly to a member (method, variable) of a huge class file, especially when a lot of methods are named similarly: Ctrl + O. Say, you’re browsing through a file which has 500+ lines of code. How do you look for a method? Don’t use Ctrl + F and then type the method name. Use Ctrl + O, which gives you a list of candidates that match what you’ve typed so far. Select the member you want using the arrow keys, and press Enter. (Alternatively, if you just want to jump from one member to the next (or previous), you can use Ctrl + Shift + ↓ or Ctrl + Shift + ↑, respectively.) UPDATE: As Nick pointed out in the comments section, pressing Ctrl + O again shows the inherited members. Thanks Nick! 🙂
- Go to line number N in the source file: Ctrl + L, enter line number. Of course if the stack trace is in the Eclipse console, you can just click the hyperlink. But if it’s in a log file or something, just use this shortcut to go to the line in a jiffy.
- Go to the last edit location: Ctrl + Q for . If you have a big file, it’s annoying to jump from one location in line 1000+ to 2000+ only to realize after looking at line 2017 that you’ve made a mistake in that location near line 1000+ just now. This shortcut brings you right to where you last edited a file. Very handy in a big file. Gone are the days of “let’s see… where did I edit it again… nope, nope… ah there it is”. (This even works when you’re already looking at a different file.)
- Go to a supertype/subtype: Ctrl + T. Before I found this, if I want to go to the superclass of a class, I’d go the the very top of the file, hover my mouse over its superclass, hold Ctrl, and click. Disgusting. Now I just press Ctrl + T and I get this dialog below, which toggles between supertypes and subtypes when you press Ctrl + T again.
- Go to other open editors: Ctrl + E. I know you can cycle through the editors using Ctrl + F6 as well, but I prefer Ctrl + E because Ctrl + F6 has this annoying behaviour of requiring you to keep the Ctrl key down, and the distance between Ctrl and F6 is so far I have to twist my left hand to do that. Just press Ctrl + E, and either use the arrow buttons, or type the name of the file you’re editing.
- Move to one problem (i.e.: error, warning) to the next (or previous) in a file: Ctrl + . for next, and Ctrl + , for previous problem. No need to lift your hands off the keyboard to click on that red or yellow stripe.
- Hop back and forth through the files you have visited: Alt + ← and Alt + →, respectively. I have to admit I don’t find myself using these two often, though.
- Go to a type declaration: F3. Alternatively, you can hold Ctrl down and click the hyperlinked variable or class or whatever it is the declaration of which you want to see–but why lift your hand off the keyboard? Just press F3 and Eclipse will bring you to the declaration of whatever is at the cursor at that moment.
OK, that’s it for this post. There are tons of other Eclipse shortcuts not covered by this article. To see the whole list, just open up your Eclipse (I’m assuming Eclipse 3.2 here–in older or more recent versions this may differ slightly), go to Help → Help Contents → Java Development User Guide → Reference → Menus and Actions. The whole motherload is there, from generating comments, correcting indentations, surrounding with, and so on.
The point I’m trying to get across is: Eclipse has a LOT of shortcuts to make things real easy for you. Java (or heck, any software) development is hard. We shouldn’t make it harder on ourselves by fighting our tools! Let our tools help us as much as possible, so we all can go back on the dot and spend more time with our family, lovers, or whatever it is we want to spend more time on. There’s no honour in working hard inefficiently. Only disgrace.
Sometimes we just don’t spend the time learning how to use our development tools, and keep using Eclipse as a simple text editor. These shortcuts really make development easier. I already use a lot of Eclipse shortcuts, nut nonetheless I didn’t knew some of these 🙂
One of my favorites is CTRL+Shift+G, which searches the workspace for references to the selected method or variable.
And 4 years later, that is just the command I was looking for
Also for anyone else reading this 4 years later, CTRL+ALT+H will do the same thing, but will also do this really neat thing of showing the call hierarchy so you can see where the execution thread is going without having to trace it yourself!
Its already been mentioned further down but I thought I’d attach it to the top post 🙂
And 1 year later, ctl-alt-h was the command I was looking for…..
And three years later… it’s three years later. 😛
Oh my god, that’s the shortcut.. Thanks man..
Here is my list of useful eclipse shortcut .
I always believe value in learning more about IDE on which you are working on. By the way here is my list of top 30 Eclipse keyboard shortcuts
There is another shortcut that i use. Is the one that maximize the page. Instead of double click on the page name just hit ctrl+m.
A complete list of shortcuts can be seen with Alt-Shift-L . Going through that list is sure to teach you a few new tricks about Eclipse 🙂
Dude, sorry, actually it’s CTRL + Shift + L.
Hugs
Awesome shortcut! Thanks. 🙂
Mother of all shortcuts. Thanks.
here is my list of useful eclipse shortcut I would rather say very useful and practical eclipse shortcut 🙂
super awesome shortcut!!
hi,
these are great!
thanks for sharing….
An addition to the Ctrl + o : doing Ctrl + o once gives you the ability to quick search/jump to methods in the class you have open, doing Ctrl + o twice, gives you the same ability but then for all methods in the current class plus super classes. Very handy!
Ah yes, many thanks, Nick! I have updated the post to reflect this 🙂
selman, great to hear that you find it useful 🙂
Just today, I was hunting for a file in multiple packages in Eclipse and to find this article an hour later! Needless to say, thank you.
As purists would say – RTFM. 😉
One of my favorites is CTRL+F6 which gives you the list of files opened in editor. Togo the last file visited CTRL+F6. To go to any other file opened CTRL+(hold) F6
you do good remapping this to the good ol’ Ctrl + Tab!
Ctrl+F3 also shows the list of the functions in a class. I never knew Ctrl+o is also mapped to the same dialog.
hi venu ctrl+f3 will minimize the screen ctrl+o only list out the methods in a class
What venu told is right vinodh
Ctrl+o will open the list for current class opened in editor.
Ctrl+F3 will open the list for class under cursor (not necessarily the class opened in the editor).
I configured my workspace so that using the sequence Ctrl+PgDn or Ctrl+PgUp will take you to the next or previous open editors in the workspace. The thing that I find much much more useful is that you can assign your beloved key sequences to the actions that you usually perform…
One more thing, as mentioned in this article, Alt+ -> and Alt+
Great post!
I wish I had some of those in Netbeans.
Why not…. Netbeans has enough shortcuts and you can assign your own as well.
NetBeans IDE Keyboard Shortcuts: http://developers.sun.com/jsenterprise/reference/techart/shortcuts.html
Yes, but it’s missing many things that this blog post features here. For example I think it doesn’t have a “Go to a supertype/subtype” (Ctrl + T) or the granularity of CTRL+SHIFT+R that eclipse has.
thanks
The “Open Resource” feature is great, but it’s a little limited by the fact that it does not allow you to select multiple entries in the list. Maybe there is a way to accomplish this (that not includes writing a plugin 🙂 )?
I’ve remapped CTRL+F6 and CTRL+SHIFT+F6 to CTRL+TAB and CTRL+SHIFT+TAB, respectively, so that it switches between files like most other applications. Of course, this screws me when I work on other people’s machines.
+1. I did the same.
Thanks for the del.icio.us update!
http://ThunkDifferent.com
Good summary.
Thanks for putting this list.
Great 🙂
Here are somemore useful shortcuts
Breakpoints Shift+Alt+Q B
Cheat Sheets Shift+Alt+Q H
Console Shift+Alt+Q C
Java Declaration Shift+Alt+Q D
Java Package Explorer Shift+Alt+Q P
Java Type Hierarchy Shift+Alt+Q T
Javadoc Shift+Alt+Q J
Search Shift+Alt+Q S
Show View (View: Outline)Shift+Alt+Q O
Show View (View: Problems)Shift+Alt+Q X
Synchronize Shift+Alt+Q Y
Variables Shift+Alt+Q V
Shift+Alt+Q and then wait a second and Eclipse can remind of of all these shortcuts with similar starts
hey! thanks for the info…did u also know that you can press ctrl-alt-h to display call hierarchy? also you can easily indent your code lines by pressing ctrl-I(as in the letter “I”)…have a good time coding and hope to have more correspondence with you! 🙂
Good One!! Thx
What about another post on the java language shortcuts ( like sysout + Ctrl-Esp => System.out.print() … it’s a shame I never need to write this in my code;- )
Very useful post. I used a few of these shortcuts already.
You can also find a couple of quick reference sheets for various versions of Eclipse ready to print here: http://eclipse-tools.sourceforge.net/shortcuts.html
To display hierachy view of current class, hit F4 – very useful.
Boy Eclipse if 4ever; I love it.
To display hierachy view of current class, hit F4 – very useful.
Boy Eclipse is 4ever; I just love it.
Holy crap, Ray. This post is awesome. I’m the king of taking 5 years to learn a useful shortcut. Open Reference, Type, and Hierarchy are already ones I survive on.. but CTL+Q and CTL+O look like a whole lot of fun. Thanks.
Great post !
When editing Java code, I like to be able to manage my imports automatically (Ctrl + Shift + O), and change the incrementation of the code (Ctrl + i).
I can’t believe you forgot CTRL+3, the latest and greatest navigation shortcut added to Eclipse 3.3M7: http://eclipsenuggets.blogspot.com/2007/05/quick-access-ctrl3-is-bliss-are-you-one.html
If you’re still using Eclipse 3.2.x, that reason alone should make you want to step up to the latest. Why wait until the end of June? 😉
Nick, that’s good to know–thanks! 🙂 Yeah, I’m still using Eclipse 3.2.x. We’re using a bunch of plugins for our project, so we’re not risking moving to 3.3 yet now. But that’s something to look forward to for sure.
You probably have forgotten to include Ctrl-Shift-O which automatically organizes import, quite useful when you’re getting red underlines due to unknown class declarations and warnings on unused imports.
Hi Allan–not at all! I’m featuring only 10 shortcuts, so obviously a lot of other shortcuts will not be featured although they’re certainly not forgotten. But more importantly, the shortcuts in this post are _navigation_ shortcuts, and Ctrl + Shift + O is not one of them.
Brilliant! I wished I could digg this here, where’s the digg button?
😉
Cheers,
yc
Hi Yuen-Chi, thanks! I just added the button 🙂
i just installed ecllipse n surfing to get some tips abt working on it n found this one very helpful.
thnx buddy
I’ve always found ctrl+h for searching particularly useful…
Really good it saved a lot time ..
Can you please publish the shortcuts for some methods in eclipse so that i dont need to type full name of it.
good…very good help
good ………….. very good
Refer this site for all eclipse navigation shortcuts
http://eclipse-tools.sourceforge.net/shortcuts.html
thnk u ashwini
This site really helpful ………………………………………
I’m new to Eclipse shortcuts and one thing I noticed was that CTL+O and CTL+F3 are different. CTL+O will give the class members of the current file. CTL+F3 will give the class members of the currently selected class within the file. If a class isn’t selected then it then it will default to the action as CTL+O
On a java class like JFrame, or on its method I pressed F3, it was not showing any description. F3 IS NOT WORKING IN MY ECLIPSE ENVIRONMENT. Please help me out. I dont know how to change the configure settings so that F3 start working properly.
give jar path mean java path and it will work
Very useful, can save lot of time in searching
You almost read my mind while coming up the list of short cuts. These are precisely the shortcuts that a Java developer craves for during the course of his Eclipse usage. Thanks a ton!
Really useful. Thanx a lot !
Use Ctrl+Shift+L to view most of this listings.
Doing Ctrl+Shift+L again will open the KEY window where you can change/add new Key Maps
HTH’s
:)eepak Kaul
Great Post. It increased my productivity.
Is there any shortcut that will help me avoid using the arrow keys ? I don’t like the frequent journeys to the arrow keys while coding.
Just something like Vim, that uses like I, J, K, L as the arrow key ?
Regarding Ctrl + Shift + T and wildcards….
One of the nice features about the Open Type dialog (Ctrl + Shift + T) is that you can type just the uppercase letters in a class name, and it will display all classes with that sequence of uppercase letters. So if you type NPE, the results will contain NoPermissionException, NullPointerException, etc.
This feature makes it really easy to search for classes with long names.
very interesting, but I don’t agree with you
Idetrorce
I would like to see a continuation of the topic
Nice List..
I do use most of them
Thanks specially for the Ctrl + E
I was thinking of the shortcut for this for long…
Can anyone tell Whats the shortcut to find the next occurance of the string that you tried to find using Ctrl + F
F3 doesn’t seem to work here as in other editors..
Better late than never I hope … I just found it (Eclipse 3.6): Ctrl+K = Find Next. Ctrl+Shift+K = Find Previous.
Alternatively you can change the meaning of F3 to Find Next in Window | Preferences | General | Keys.
Very nice! A few of these I use all the time but some others were new to me. One of my favorites that’s not on the list is Ctrl + Alt + H = Open Call Hierarchy.
🙂
Ray,
for me the main problem was remembering all the neat shortcuts I wanted to use. Finally I wrote an Eclipse plugin MouseFeed (http://www.mousefeed.com/) to help me with that. If you call an action with a mouse click, the plugin will remind the keyboard shortcut for it. You can even tell it to force you to use keyboard shortcuts – the actions called by mouse won’t run. The configuration is action-specific.
Please take a look and let me know what you think.
Does Ctrl + Mouse Click go to a Type declaration in Eclipse?
I’m using Europa, but the click shortcut doesn’t seem to work.
yes it does.
Does anyone know why Ctrl-E lists the files in two groups?
Yes, I know that the bottom group is the ones for which
the tabs are currently visible, but when I’m searching for
a buffer, I’m supposed to remember which buffers are
have tabs that are currently visible? Is there any way
to just list all the buffers, alphabetically?
very usuful tips and these are helpful to me a lot
thank you so much..
Hi All,
I have a problem with WSAD5.1 Editor. when I clicked left mouse button with Holding down the ctrl key on any variable or mathod in a file then that method declaration is opening in a new window. now the problem is that I am able to see only the declaration in that file and not full file. while previosly I was able to see the full file.
please if you know the solution or is it due to some setting changed then please let me know ASAP.
Thanks
Thanks…
Note that on mac the keys are slightly different — browse resources is command+shift+R. Go figure 🙂
The information is very usefull. Thanks a lot
Useful tips. Am sure it will save some time for me. Thanks a many!!
Alt + Shift + R on the name of a variable allows you to rename it, and it will change all the references on the file.
nice article 🙂 here is the summary
Open any resource: Ctrl + Shift + R
Open a type: Ctrl + Shift + R
Go directly to a member (method, variable): Ctrl + O
Go to line: Ctrl + L
Go to the last edit location: Ctrl + Q
Go to a supertype/subtype: Ctrl + T
Go to next problem Ctrl + .
Hop back and forth through the files you have visited: Alt + ← and Alt + →
Go to a type declaration: F3 on the variable
Go to a type declaration: Ctrl down and click the hyperlinked variable
oops,
Open a type: Ctrl + Shift + T
Ctrl +Shift + L will show list of all the shortcuts used in Eclipse. It is really helpful to learn shortcuts with that. If you forgot just use Ctrl +Shift + L to have a quick look at them.
Hi, Its a great pleaseure to thanks all for this valuable information , keep rocking,
Can any one tell the shorcut to apply predefined error solution for our errors in our coding
Great post. Thanks.
Great tips, going to save me some time
Hi guys,
I have been using eclipse for quite a while now but haven’t been able to find a particular which I think exists.
Many sites offer code with line numbers, when we do a copy/paste the line numbers too get copied, Could anyone suggest a shortcut to remove all the unwanted line numbers at once?
The post is awesome,
Thanks
Great article, cheers!
I actually do use alt quite a lot already, I find them pretty useful.
My top shortcut you didn’t mention is
ctrl shift p
to switch between opening and closing braces.
Hats Off to u ray and sam for publishing such Excellent and very useful short cuts
Anyone know of a shortcut that stacks declarations? F3 takes you to a declaration, but is there a shortcut to get you back to where you were? Another editor I’ve used will actually stack the jumps to var/method/class declarations, so you can jump to a declaration, browse around, then jump to another declration, etc. When you’re done, you can backtrack to where you started. Is there a counterpart to F3?
Any update on your question of jumpinig back from a declaration..? I’m looking for the same feature… I saw proposals to use Alt left but this is doing “Back” instead of stacking the declarations…
Please advice.
Thanks!!
Gal
just added notification..
Anyone know of a shortcut similar to Ctrl+O but that looks for methods/members in all the workspace?
Sometimes I want to jump to a function directly without having to Ctrl-Shift-R to its class.
thnx
I was one of those searching for classes, methods and packages with great difficulty. but no longer…
Thank You!
Very nice list – a couple I find myself using all the time are :
Back: Reveals the previous editor location in the location history. Alt + Left
Forward: Reveals the next editor location in the location history. Alt + Right
All the Best,
Jonathan
kickass article on eclipse man ….very nice ..loved it
Superb article, Great Work!
I actually do use alt quite a lot already, I find them pretty useful.
thanks for tips
Thanks! Really useful shortcuts list and very well explained.
good work !!!!!Also thankyou .
Nicely done mate 😉
Best intro article on Eclipse keyboard shortcuts, after learning which one could easily be motivated to learn and use most other Eclipse shortcuts as specified in its 2-page shortcut default conf cheat sheet.
this article is awesome
can anyone tell me if there is a way to link files to one another. I know you can provide links using Javadoc comments, but that has limitations that it will only link to other Java files and they must be in the same package.
What I would like is all three: My Java file, the related Junit test case and the related Junit tescase(usually a .cpp file) should have links to each other.
And these reside in different packages, and I cannot put them together.
I meant Java Code, JUnit test case, and test DATA(the .cpp file)
Hey, great compilation!
But you forgot another really helpful one:
Ctrl-3 opens a quick search for basically EVERYTHING you can do in the menus. (Show a particular view/perspective, generate getter/setter, commit to svn)
Wow, thx, that’s helpfull for nub like me XD
Re: switching between editors/files.
As soon as I install Eclipse, I like to immediately remap the next/previous editor shortcuts to ctrl-tab and ctrl-shift-tab.
As natural as switching tabs in Firefox – this is the number one shortcut I end up using on a daily basis.
Thanks,
Very thanks my friend.They are very usefull.
A very nice subject.. thank you so much.. also for the rest very nice comments
Great list, very comprehensive and useful.
Thanks a lot, I’ve been looking for the Ctrl+Q type of option for ever.
Superb..Thanks a lot.. 🙂
yeeaah, so thank you.
Awesome ! thanks a million.
ALT+SHIFT+C TO CHANGE METHOD SIGNATURE
Good tips! Thanks, this is exactly what I was looking for in Eclipse.
Here’s a good one… ALT + F4
Then launch NetBeans.
Yeah…
Only a moron use NetBeans
Go to the last edit location: Ctrl + Q.
This one is great but even better doen in Netbeans. Actually this is a reason for me to prefere Netbeans over Eclipse sometimes. (Not trying to start a flame war here but just to increase the motivation to find an answer to my question 😉
In Netbeans hitting Ctrl + Q twice takes you to the position before the last change, three times to the one before that, and so on. You can ride through your history of change positions. This is awsome.
Does Anybody have an idea how to achieve this in Eclipse? I miss this sooo desperately when working in Eclipse.
Muito obrigato… foi muito útil.
Even after all this time, this post is still hugely helpful (especially the comments). My question is how come this information isn’t obvious from within Eclipse itself?? For example, I didn’t even know ctrl-r “Open Resource” even existed! It’s not in any menu nor book I’d ever found….without this post, I’d have never know about…incredible!
its good thanks buddy
good introductioN!
Thanks for the nice article!
It’s also very useful to create new assignments – for example to switch perspectives, see Eclipse: quickly change perspectives with keyboard shortcuts
Thank You Very much !
I like this list of shortcuts
http://shortcut-finder.appspot.com/?query=eclipse
very informative..thanks a lot.
james smith
javajobs.net
The best part is u can rebind the shortcuts and have you keys at your convenience….
Try pressting ctrl+shift+L and then ctrl+shift+L,
and rebind the shortcuts by selecting the command and press keys for new key.
Wow…..I used all the shortcuts…
Thankx for the shortcuts… It’s so helpful…
Invaluable list, thanks.
u rocking man……nice short cuts….love them…..
Thanks for a good article. This will save me and my company a lot of time. Even though this article starts to get a little old, everything works fine, but an updated version with more shortcuts had been great;)
Precisely what I was looking for. Thanks a lot!
Hi,
note that you can customize the shortcuts of Eclipse.
Simply go to Preferences then General > Keys
pengen ngecommnet tapi di sebelah kiri ada foto
gimana caranya ??
One of my favorites is the bookmark / annotation navigation.
just bind the add bookmark.
and then use ctrl + . | ctrl + , to navigate trhough your bookmarks.
(You might have to add bookmarks in the annotation navigation toolbar where you will see warnings and errors).
All Time favorite (mentionned here) Alt + q : last edited line (no matter what file)
Have fun coding
Most of these hotkeys works in the Eclipse plugins like Flash builder, thanks!
For those who don’t like spaces formatting – use Tab and Shift+Tab when formatting code from the internet page, for example.
Nice list but a few huge time-saver ones are missing here:
Ctrl + space : for auto-completion
Ctrl + 1 (one) : for suggestions of automatic generation/refactoring
Ctrl + Shift + F: for auto-formatting
Ctrl + Shift + O: organize imports (already mentionned by someone else)
Also a little approximation, Alt + left/right arrow is not only to jump between files. It’s very convenient combined with F3. For example, press F3 on a call to a private method, you’re going there. Then Alt+left arrow brings you back to the call.
One that i found very interesting which helped me a lot these days was:
Ctrl + H
It opens a Search window for all your workspace, not only for a file or a project, but for all your projects inside your workspace.
On this window there are many tabs for the types of archives, i use the file search. I can see all the ocurrences of a specified String in my workspace and then replace it for another thing. Incredibly useful, and much more broad than a simple Ctrl + F.
Regards.
Thank you for that interesting list!
hi,
nice tutorial for fresher.all the best and keep adding such tutorials
I am new to Java, Eclipse, Velocity etc…
And to my surprise, I found that, these short cut keys won’t work for velocity.
OK. These are very good but …
I have a file open and in a Java Text Editor window and I have a whole bunch of packages and projects that are collapsed in the Package Explorer. I used Cntrl R to find it.
Is there a shortcut that expands the Package Explorer around the class that I am editing? ie. “Show in Package Explorer”?
I am sure I saw it somewhere but darned can’t find it now. Any help would be greatly appreciated.
Sometimes we you suffer from sickness without knowing until when someone shows you some medicine, then you ask yourself how comes I never knew I was sick.
These short cuts revelation is the best thing that I have met this year, I just love the way I can navigate through eclipse, following through errors and fixing them. thanks rayfd
CTRL+Shift+H – greps a Search Phrase in all Working Sets
ALT+Shift+R – Rename method/field/variable and update references in whole workspace (including resource files)
CTRL+2 – Hit when writing “new Foo()” and directly introduce new variable or field
Ctrl+T does more than just navigate to super- and subclasses. Put the cursor on a method and hit Ctrl+T, and selecting the super- or subclass will take you to the declaration/implementation of that method in that class.
I think if you have a 2000+ line source code file no amount of shortcut keys will help you!
I… I, . I love you, man!
Seriously awesome list. 🙂
I try to learn every shortcut key I can and not only did your list teach me a couple new ones, your advice to check out that section of “Help Contents” revealed a few more gems.
I was reluctant to check the help section because I thought just going to Preferences > Keys would be better but no! The help section highlights a lot of good shortcuts that would take a long time to uncover by searching through Preferences > Keys!
Thanks for article. I have noted down all of sortcuts on page and gonna stick near to my computer. ‘ll use it as much as i can to save time and energy level.
Thanks again.
Good and clear explanation. Thanks for share.
Or, simply, “This sentence is false.”
Nice article!
I recently found the Quick Access Shortcut and I now use it extensively.
Default shortcut is: CTRL + 3
Espectacular, gracias!
Thanks, those shortcuts are really helpful and improve productivity.
I didn’t know some of them.
So nice of you to share this. Great Blog.
Very useful information. good work.
This one took me some time to find: F2 brings quick JavaDoc (without touching the mouse).
Useful informaton….well explained .
DON’T FORGET: hold down Ctrl to make any method, variable or class name a link that you can click to go to their definition (be it in the same class or another one).
seriously… i dunno how i forgot about this one, and i was sure it’d pop up here, but apparently not. i guess most people know about it, but for those who don’t, it’s great stuff.
oh, and of course:
Ctrl + Shift + C: comments out the lines that are selected, or if they are commented already it de-comments them.
…although that’s not navigational, it saves me a lot of time commenting out stuff.
Ctrl – / does that as well (commenting/uncommenting).
Brilliant. Just what I have been looking for. Well published.
I frequently use Ctrl + NumPad_Divide (“Enable Folding”).
Ctrl+Shift+L
for all shortcut keys display in Eclipse 🙂
My favorite is Ctrl+PageUp and Ctrl+PageDown
Thanks
Also, when in the ‘Open Type’ menu (Crtl+Shift+T) – if your classes follow CamelCasing, you simply type the capital letters of the class only, and the wildcard between will be implicit.
EG – if trying to find class ‘MyTestClass’, simply type ‘MTC’
Don’t forget you can use an asterisk as a wildcard when doing the ctrl+o. So, “set*Name” will show “setFirstName”, “setLastName” etc.
Thanks a lot … its really help full … 🙂
Here is my personal list I use in NetBeans:
http://kdelchev.com/2012/02/netbeans-eclipse-pdt-shortcuts-comparison/
Navigational Shortcuts:
F10
Main menu:
Shift+ F10 Context menu
Ctrl +F10 View menu
Workspace navigation:
F12 Activate editor
Ctrl+Shift+W Switch editor
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
Files:
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
Find:
Ctrl +L Goto line
Ctrl +F Find
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
Java navigation:
F3 Goto declaration
Ctrl+ Shift+ U Find references in file
Ctrl +Shift+ G Find references in workspace
Ctrl+ G Find declarations in workspace
Ctrl +Shift+ P Navigate to matching bracket/brace
Ctrl +T Popup type hierarchy
Ctrl +Shift+ T Open Type
Ctrl +O Outline of current source
Ctrl +F3 Outline of current cursor position
Ctrl +Shift+ Arrow Jump beetween methods up or down
F2 Show Javadoc
F4 Show hierarchy
Ctrl +Alt+ H Open call hierarchy
General editing:
Alt+ Arrow+ Move line(s) up or down
Alt +Shift+ Up Expand selection to enclosing element
Alt +Shift+ Right Expand selection to next element
Alt+ Shift+ Left Expand selection to 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
Java editing:
Al+t 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 +/ Comment
Ctrl +\ UnComment
Ctrl +Shift+ Space Parameter hints
Ctrl Hyperlink identifier
Ctrl+ I Correct indentation
Shift+ Space Incremental content assist
Debugger:
F5 Step into
F6 Step over
F7 Run to return
F8 Resume
F9 Relaunch last
F11 Run/debug last
Ctrl+ F11 Run
Ctrl +Shift+ B Toggle breakpoint
Ctrl+ D Display
Ctrl +Q Inspect
Ctrl +R Run to line
Ctrl +U Run snippet
Refactoring:
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
Misc:
F5 Refresh
F1 Infopop
F2 Show resizeable hover
Thanks, It helped me a lot.
Wow! Thank you so much. I wish I found this sooner.
OH MY THERE’S A LOT OF COMMENTS!
thanks dudeeeeeeeeeeeeeee
Ctrl-T worked for about 15 min … now it does nothing. I @#@#$@ love eclipse!
Great list of shortcuts
thx guys, this is awsome 🙂
Good list.
Ctrl+1 (QuickFix) is by far my most used shortcut when coding – I do things like myVar = someMethod(), and then use QuickFix to declare myVar to be the appropriate type.
Thanks a lot . I am using this shortcuts on a regular basis!
Amazing people still looking at this like 5.5 years later. Have to say thanks SEO (for finding this) and this dudes page for staying hosted.
Thank you, I love tips like these!
لست في حاجة إلى حفظها عن ظهر قلب
وإنما يكفي أن تضغط على
Ctrl+Shift+L
لترى جميع الموجزات
abdennourtoumi, I agree, however knowing it by heart allows you to train your muscle reflex. When it becomes second nature, you don’t even need to pause, and your programming flow doesn’t need to be interrupted to look at the list 🙂
Thanks a lot. I was really using eclipse as something more than just a text editor. 🙂
For the skip to a problem error, you have + twice for both forward and back.
find a file which is has same filename in different location in workspace
My favorite part about Ctrl+Shift+T is that you can just type in the capitalized initials. For example, if a class is named AbstractAutomotiveVehiclePart you can type AAVP and that class (and others who happen to have the same initials) shows up.
A great thank You for this shortcut list! I found “Ctrl-E, Return” which brings me back from any non-editor-view to last editor place. Kind regards 🙂
Navigate to matching bracket: CTRL+SHIFT+P
Its like CTRL+} in Visual Studio
After 8 years, [Ctrl + Q], [Ctrl + E], [Alt + ] are my take aways (for PHP development). Thanks dude.
Thanks to Mangorz for [Ctrl + Shift + C].
Thank you
what is the use of this package name eclipse
Great list so much useful!
Thanks for Ctrl + Shift + R!
Ctr + L: Go to line.
Just what I needed!
Just what I needed!! Thank you so much
Startup Oasis Co-living