Top 10 (not so popular) Eclipse Shortcuts

May 19th, 2009 Handerson Gomes, Consultant  (email the author)

I’m fortunate enough to spend a good part of my days writing code in an IDE and I believe that we can always be more efficient even if that means reaching the mouse less frequently.

I’m an earlier Eclipse user, and throughout the years I’ve learned a lot of helpful shortcuts. Most of them are very popular like the ctrl+s to save and F3 to open declaration. Here are my top 10 not so popular shortcuts available in Eclipse 3.x and by consequence IBM Rational Application Developer 6 (RAD) and newer versions.

These shortcuts not only allow me to navigate easily through the source code, but also helps me stay focus on the code I’m writing and making refactoring a second nature, which by the end of the day tends to improve the overall quality of the software.

1. Open Resource (ctrl+shift+r)

This one is probably the biggest time saver of all shortcuts. This shortcut allows you to open any file in your workspace by only typing the first letters of a file name or a mask, like applic*.xml. The only drawback of this shortcut is that it is not available in all perspectives. ctrl+shift+R Open Resource

2. Quick Outline (ctrl+o)

Do you want to view the methods of the current class or navigate to a specific method without having to scroll down the code or use the find function? ctrl+o is the answer. It will list all methods and attributes of the current class and you can just start typing the name you want and then press enter to navigate directly to that method or attribute.

ctrl+o Quick Outline

3. Quick Switch Editor (ctrl+e)

This one will help you navigate through the open editors. You can use ctrl+page down or ctrl+page up to navigate to the next and previous tabs, but ctrl+e will be more effective when you have a lot of files opened.

ctrl+e Quick Switch Editor

4. Assign to local variable (ctrl+2, L)

During development I’m used to first write the method invocation, like Calendar.getInstance(), and then assign the return of the method to a local variable using this shortcut. It saves me the time to enter the class name, variable name and also the import declaration. The ctrl+2, F is similar but will assign the return of a method to a field in the class.

5. Rename (alt+shift+r)

Renaming attributes and methods was a big deal years ago, using a combination of search and replace that frequently would lead to broken code. Every modern Java IDE today provides refactoring capabilities and Eclipse is not different. It is so easy to rename variables and methods names that once you get used to it you’ll be renaming it every time you think it is necessary or when a better name is recommended in code review sessions. To use this shortcut just move the cursor to the attribute or method name and press alt+shift+r, enter the new name and press enter. Done! All references to this method in every class in the project will be renamed automatically. If you’re renaming an attribute of a class you can press alt+shift+r twice, it will display the Refactor Dialog which allows you to automatically rename the gets and set methods also when refactoring an attribute.

6. Extract Local Variable (alt+shift+l) and Extract Method (alt+shift+m)

Refactoring also includes extracting variables and methods from blocks of code. These two shortcuts allows us to do exactly that. Do you want to create a constant from that String? Just select the text and hit alt+shift+l. If that same string is in other places on the same class it will automatically be replaced there. The Extract Method is also very helpful and clever enough to know (in most cases) the arguments that must be used when you want a section of your code to be exposed as a new method. Breaking larger methods in smaller well defined methods is one of the best ways to reduce cyclomatic complexity and also to improve testability of your code.

7. shift+enter and ctrl+shift+enter

Shift+enter adds a new blank line right above moving the cursor to the new line. The difference between a regular enter is that the cursor doesn’t need to be at the end of a line. The ctrl+shift+enter does the same thing adding the line right before the current line.

8. Alt+arrow keys

This one is a big time saver too. It will move the current line or selection up or down. Very helpful when moving sections of code  in try/catch blocks.

9. ctrl+m

We all know how productive a big screen is and the ctrl+m shortcut will maximize the editor view.

10. Next Error (ctrl+.) and Quick Fix (ctrl+1)

ctrl+. moves the cursor to the next error or warning in the current file. I use this almost always in conjunction with ctrl+1 which is the suggestion shortcut. New versions of Eclipse are pretty clever on the suggestions, helping you sort out a lot of problems like missing arguments in methods, throw/catch exception, unimplemented methods, etc.

ctrl+1 Quick Fix

If you want to view more shortcuts you can type ctrl+shift+L in Eclipse.

Feel free to share your favorites shortucts using the comments.

Be Sociable, Share!

Entry Filed under: Agile and Development

62 Comments Add your own

  • 1. James Ervin  |  May 19th, 2009 at 3:20 pm

    I had to mention one that you forgot to mention. I always tend to you Ctrl-Shift-T, which is open type instead of open resource. From a java coding perspective, I think it is far more useful.

  • 2. Peter Hendriks  |  May 19th, 2009 at 3:25 pm

    My favorite is the Ctrl+3 shortcut: open views, prefs, etc. all in one shortcut!

  • 3. Vadim Berezniker  |  May 19th, 2009 at 7:56 pm

    I was going to mention Ctrl+3 as one of the best unknown shortcuts/features, but someone beat me to it :)

  • 4. teo  |  May 20th, 2009 at 3:35 am

    OMG! I’ve been looking for “go to the next error” for sooo long!

  • 5. jakob  |  May 20th, 2009 at 5:58 am

    My “refactoring combo”::

    Alt+Shift+Arrow keys to select a Java expression, then Alt+Shift+(L|M|T) to extract a variable, method or to open the refactoring menu.

  • 6. Handerson Gomes  |  May 20th, 2009 at 8:12 am

    I would like to thank you all for the contribution. The Ctrl+3 is really a neat shortcut.

  • 7. Ignacio Coloma  |  May 20th, 2009 at 2:46 pm

    Shift + Alt + S, R -> Generate getters and setters.
    Shift + Alt + S, O -> Generate Constructor using fields.
    Ctrl + Alt + Arrow keys -> Duplicate selected code.

    It’s funny, I had to open eclipse to find these out. I don’t know the keys, only the arcane gestures over the keyboard :)

  • 8. Eduardo  |  May 20th, 2009 at 3:32 pm

    The shortcut I use more often is “Next Editor”, however, its default key bind is not intuitive: Ctrl+F6. Change it to Ctrl+Tab and be happy :)

  • 9. PRSoluções » Blog&hellip  |  May 20th, 2009 at 6:49 pm

  • 10. kodeninja  |  May 21st, 2009 at 6:47 am

    One very nice feature (although not a shortcut) in the Eclipse editor is the ability to automatically escape the data being pasted into a String literal. It’s disabled by default, so you need to enable it under Window -> Preferences -> Java -> Editor -> Typing.

    Quite helpful when pasting, say, file/directory paths under Windows, which use ‘\’


  • 11. Alipio Krohn  |  May 26th, 2009 at 12:28 pm

    Great Handerson !!!

    Congratulations for the new blog. Excellent !


  • 12. cmars  |  May 26th, 2009 at 5:25 pm

    F3 -> Open Declaration
    Ctrl-Alt-H -> Open Call Hierarchy

    Invaluable when getting to know a new codebase.

  • 13. Rahul Kamra  |  June 1st, 2009 at 8:29 am

    My personal favorite Ctrl + D : Delete the current line , very handy when you want to remove white spaces

  • 14. Suresh Reddy  |  June 18th, 2009 at 12:31 am

    hi your shortcuts are very help ful

    thank you very much

  • 15. shortcut-finder  |  February 22nd, 2010 at 10:07 am

    this is a good list of eclipse shortcuts

  • 16. Javin Paul  |  January 7th, 2011 at 11:23 am

    here is my list of useful eclipse shortcut I would rather say very useful and practical eclipse shortcut :)

  • 17. showman  |  October 5th, 2011 at 5:08 am

    alt+shift+a columnar selection

  • 18. showman  |  October 5th, 2011 at 5:16 am

    ctrl+shift+l eclipse shortcut popup
    tap it twice and the preferences dialog will open

  • 19. Jon  |  November 15th, 2011 at 1:37 am

    Don’t forget about Ctrl+2, R for a local rename which is a much quicker operation than a refactor rename in large codebases usually.

  • 20. Andrew Traudes  |  November 26th, 2012 at 6:24 pm

    Not specific to Eclipse, but select multiple lines and Tab to indent them all at once instead of one by one. Most people know about that one, but here’s the killer: Shift-Tab to do the opposite :-) That one made me really happy, especially when editing HTML, Javascript, JSP, etc.

  • 21. Zaheeb  |  December 14th, 2012 at 7:54 am

    Alt+Shift+X, T (for a Junit) or J (for a Java Application) and many others as well.

  • 22. me  |  October 23rd, 2013 at 9:19 am

    Alt Gr + C svn commit
    Alt Gr + U svn update

  • 23. Malte  |  October 31st, 2013 at 3:45 am

    Very nice selection of shortcuts, thank you for that!

    This shortcuts are also very useful in many ways:
    alt+shift+arrow up/down to expand/reduce the current selection logically (expression, block, method).
    This can for example be used for a fast debugging: Turn the cursor to a position of an expression you want to evaluate, press alt+shift+arrow up so often, until the wished expression is fully selected and then strg+shift+i to show the evaluated value.

  • 24. FRIV  |  April 17th, 2014 at 9:32 pm

    What’s up, just wanted to say, I enjoyed this blog post.
    It was helpful. Keep on posting!

  • 25. farmville 2 gratuit  |  April 19th, 2014 at 7:34 am

    Greetings! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche.
    Your blog provided us useful information to work on.

    You have done a marvellous job!

  • 26. best shower radios  |  July 23rd, 2014 at 1:50 am

    Hi! This post could not be written any better!

    Reading through this post reminds me of my previous room mate!
    He always kept chatting about this. I will forward this article
    to him. Pretty sure he will have a good read. Thanks
    for sharing!

    Feel free to surf to my site; best shower radios

  • 27. shaving cream colored eggs  |  July 23rd, 2014 at 10:37 pm

    There’s definately a lot to find out about tis topic.
    I like all the points you have made.

  • 28. subway gratuit  |  July 24th, 2014 at 2:36 pm

    Superb, what a website it is! This web site provides useful facts to us,
    keep it up.

    My blog post … subway gratuit

  • 29. what is best diet pill for women  |  July 24th, 2014 at 9:36 pm

    The first of the calves and the more of prescription diet pills that work
    fast a healthcare provider as soon as you go to fast weight loss, but tasty snacks.

  • 30. best over the counter diet pills that work fast  |  July 26th, 2014 at 9:18 pm

    Omega 3 is not an effective weight loss, are usually sessions lasting most effective diet pills for weight loss 60 minutes
    or less. If you do is squat but do we cut back your weight loss?
    You are able to eat carbs, too, can be a viable option for individuals most effective diet pills for weight
    loss who wish to shed. You can start most effective diet pills for weight loss with as little as 5 months.

    So it is very good for health.

  • 31. __________ ___________  |  July 31st, 2014 at 9:47 am

    Hi there, yeah this paragraph is really fastidious and I have learned lot of things from it about blogging.

  • 32. greed for glory simpsons tapped out hack ios  |  August 1st, 2014 at 6:28 pm

    The potential and real danger surround Entrenchment leaders are
    insecurity and power abuse, moral compromise and lapse, breaking of rules, pride, vanity,
    fantasy and fanaticism all rolled into one.

    Garr rush Emirates sent through the assassin attacks, permit the life on the verge of death or destruction. This is the price that you contain the best
    chance of success.

    Look into my site :: greed for glory simpsons tapped out hack ios

  • 33. Fat Burning Chef  |  August 2nd, 2014 at 5:31 pm

    I’ve just designed a software program which can efficiently
    scrape suitable contents of an issue (as well as
    topic your blog is focused on) with the engines like google to make immense 100% copyscape
    passed material. Are you gonna be interested to learn it?

  • 34. tv advertising prices  |  August 3rd, 2014 at 3:14 am

    Helpful info. Lucky me I discovered your web site by chance, and I am surprised why this accident didn’t happened earlier!
    I bookmarked it.

    Here is mmy page … tv advertising prices

  • 35. Http://eviansspring.Com  |  August 3rd, 2014 at 9:54 am

    Do you have a spam problem on this website; I also am a blogger, and I was
    curious about your situation; many of us have developed some nice methods and we are looking to swap solutions with others,
    be sure to shoot me an e-mail if interested.

  • 36.  |  August 4th, 2014 at 4:44 pm

    Appreciating the persistence you put into your site and in depth information you offer.
    It’s great to come across a blog every once in a while that isn’t the same out
    of date rehashed material. Excellent read! I’ve
    saved your site and I’m adding your RSS feeds to my Google account.

  • 37. healthy diet pills to lose weight  |  August 4th, 2014 at 5:36 pm

    Instead of lowering calorie consumption and try creating
    your clean cup of whole meals. Depending how many best healthy diet pills for women calories you want to do
    it, you must start again. Not even you One of best healthy diet pills for women the gate.

  • 38. best basketball shoes 2013  |  August 7th, 2014 at 6:40 am

    Author Bill Parsons is the creative author for an online specialty store that offers both items and information for all your athletic equipment needs.
    That said, it is also one of the most difficult aspects of the game to really master.
    Whatever it is basketball jerseys have become a
    pillar of fashion not just in basketball but everywhere where basketball
    is played.

  • 39. instagram followers  |  August 7th, 2014 at 8:11 pm

    Oh my goodness! Incredible article dude! Many thanks,
    However I am encountering problems with your RSS.

    I don’t understand the reason why I cannot join it. Is there anybody
    else getting similar RSS issues? Anybody who knows the answer
    can you kindly respond? Thanx!!

  • 40.  |  August 8th, 2014 at 12:01 pm

    So too, Contra-Tiempo, the Urban Latin Dance Theater founded six in years past by
    siblings Ana Maria Alvarez and Cesar Alvarez is often a conglomeration of sorts, an eclectic performing arts organization that enjoys innovation. The story is told that there would
    have been a tribe up to now in the jungles of
    Africa that undertake and don’t had even left the village or had experienced a white
    man. At the 4th and 5th levels, you will get some
    experience and understand how to make use of first Do – T spell, referred to as Shadow Word: Pain.

    My weblog: hungry shark evolution hack ipad (

  • 41. home business  |  August 9th, 2014 at 6:04 am

    Hello there! I know this is kinda off topic however
    , I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog
    article or vice-versa? My website covers a lot of the same
    subjects as yours and I feel we could greatly benefit from each other.
    If you’re interested feel free to shoot me an email.
    I look forward to hearing from you! Terrific blog
    by the way!

    Have a look at my web site; home business

  • 42. Heriberto  |  August 9th, 2014 at 8:49 am

    Do you have a spam problem on this site; I also am a blogger, and I was curious about your situation; many of us have
    created some nice procedures and we are looking to exchange strategies
    with other folks, why not shoot me an email if interested.

  • 43. Quinn  |  August 9th, 2014 at 10:07 pm

    If so, some of its bullion coin Minifigures range is offered.
    Glacier, there are bullion coin more than $250. Where to BeginTo start investing in precious metals.
    The sell-off was driven by a self-directed IRA, an Indonesian environmental organization of which is a special horse.
    The answer is a immense investment for your needs. And if we
    do know however is that game lovers book these versions in advance the cost of
    only about 10% leaving 30, 500 ?35, 581.

    Take a look at my website – ira investment calculator (Quinn)

  • 44. easy money making ideas online  |  August 10th, 2014 at 12:20 am

    Quite frankly, contrary to popular belief, making money online isn’t as hard or
    difficult as most folks make it out to be
    and once you understand and implement what is often called the ‘power of duplication’, then anyone – regardless of age, sex, education or technical background
    can start making money just as fast. Stop wondering how to make quick money online and start making it happen today.
    Information on how to start a blog and make money should be useful.

  • 45. chemise  |  August 10th, 2014 at 9:13 pm

    Pretty! ƬҺіs Һas ƅеen an extremely wondderful article.

    Τhank үօu fοr supplying these details.

    my homepaage … chemise

  • 46. Isabell  |  August 11th, 2014 at 2:48 am

    This really is genuinely great!! Your page is very unique…
    I hope still write even more in the future! Thanks a lot plus keep up
    the excellent job…

    My page: vps for forex trading, Isabell,

  • 47.  |  August 11th, 2014 at 7:54 am

    The key to being the case top. Historically, gold prices low and we trusted his judgment.

    I imagine every one of the high gold price was down 5%.
    Jitters Coffee– and the other one’s gone, and then the United States would say” bold” because the ointment will
    have a bunch of electronic widgets that no two websites would require same revamping.

    Feel free to surf to my site gold ira investing (

  • 48. Marrakech riad 9 rooms  |  August 11th, 2014 at 1:12 pm

    The two acquisitions riad marrakech hammam totaled about $150 million. All rooms have air-con.
    The realty sector ison boom in all through the travel duration. Find a reputed
    agent to help you take your pets into the villa.

    Feel free to surf to my web blog … Marrakech riad 9 rooms

  • 49. your baby can read&hellip  |  August 12th, 2014 at 11:28 am

    your baby can read

    Top 10 (not so popular) Eclipse Shortcuts | Summa Blog

  • 50.  |  August 13th, 2014 at 4:41 am

    That appears to be my enclosure we decided to buy just lately,
    extremely pleased with it for everyone upon the fence in regards to getting one, get
    it done, you wont regret it

    Feel free to visit my blog post … steam shower kit –,

  • 51.  |  August 13th, 2014 at 6:21 am

    Read this site and bought a steam shower and never ever looked backwards, quality information on this
    website can not say thanks enough

    Visit my homepage: Steam shower generator (

  • 52. Interiør  |  August 14th, 2014 at 11:08 am

    This piece of writing presents clear idea in favor of the new users of blogging, that actually how to do blogging and site-building.

  • 53. Alan Trider Profile  |  August 18th, 2014 at 3:34 am

    Just ensure that you have a high credit ranking to get skilled to obtain 1.
    This kind of residences can be found finished or may be built with customized layout.
    Hyderabad is the ideal location to invest, for terrain as well as residences, for
    several good reasons: The economic system is booming and goals to
    increase further.

  • 54. Texas drug rehab centers  |  August 20th, 2014 at 2:12 am

    I don’t know whether it’s just me or if everyone else encountering issues with your website.
    It looks like some of the text on your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them too?
    This might be a issue with my browser because I’ve had this happen previously.

    Have a look at my webpage – Texas drug rehab centers

  • 55. time Consuming Project&hellip  |  August 20th, 2014 at 3:11 am

    time Consuming Project

    Top 10 (not so popular) Eclipse Shortcuts | Summa Blog

  • 56. bestdrugrehabilitation   |  August 20th, 2014 at 4:56 am

    The other day, while I was at work, my cousin stole my iPad and tested to see
    if it can survive a 30 foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and
    she has 83 views. I know this is totally off topic but I had to share
    it with someone!

    my website bestdrugrehabilitation 

  • 57. Build Muscle Fast  |  August 20th, 2014 at 9:41 am

    Hi friends, how is everything, and what you wish for to say on the topic
    of this post, in my view its genuinely remarkable for

  • 58. drug rehab centers in birmingham Nevada  |  August 20th, 2014 at 2:40 pm

    Right now it seems like Drupal is the top blogging platform out there right now.
    (from what I’ve read) Is that what you are using on your blog?

    Here is my page; drug rehab centers in birmingham Nevada

  • 59. Pennsylvania drug program  |  August 20th, 2014 at 2:47 pm

    Normally I do not learn article on blogs, but I wish
    to say that this write-up very forced me to try and do it!
    Your writing taste has been surprised me. Thanks, very nice article.

    my web blog Pennsylvania drug program

  • 60. Our Masters Camps  |  August 21st, 2014 at 1:45 pm

    It’s not my first time to visit this website, i am visiting this website dailly and obtain nice data from here every day.

    My web page – Our Masters Camps

  • 61.  |  August 21st, 2014 at 10:15 pm

    I’ve been exploring for a little for any high-quality articles or blog posts in this sort of house .

    Exploring in Yahoo I finally stumbled upon this website.
    Studying this information So i am glad to convey that I have an incredibly just right uncanny
    feeling I found out exactly what I needed.
    I most unquestionably will make sure to do not omit this site and give it a look regularly.

    Here is my web page: Boom beach hack []

  • 62. Waldorfdrugrehab  |  August 21st, 2014 at 10:16 pm

    Excellent post. Keep posting such kind of info
    on your page. Im really impressed by it.
    Hello there, You have performed an excellent job. I will definitely digg it and individually recommend to my friends.
    I am confident they will be benefited from this website.

    My web-site: Waldorfdrugrehab

Leave a Comment


Required, hidden

+ four = 13

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed

© 2010-2014 Summa All Rights Reserved