{"id":620,"date":"2009-08-18T21:17:33","date_gmt":"2009-08-19T06:17:33","guid":{"rendered":"https:\/\/www.kellyrob99.com\/blog\/?p=620"},"modified":"2009-08-18T21:17:33","modified_gmt":"2009-08-19T06:17:33","slug":"my-favorite-intellij-resources-tips-and-tricks","status":"publish","type":"post","link":"https:\/\/www.kellyrob99.com\/blog\/2009\/08\/18\/my-favorite-intellij-resources-tips-and-tricks\/","title":{"rendered":"My Favorite IntelliJ Resources, Tips and Tricks"},"content":{"rendered":"<p>Today at work I was reminded that I didn&#8217;t learn how to use my <a class=\"zem_slink\" href=\"http:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\" title=\"Integrated development environment\" rel=\"wikipedia\">IDE<\/a> overnight, and that I&#8217;ve been greedily hoarding where I found good resources for learning how to drive <a class=\"zem_slink\" href=\"http:\/\/www.jetbrains.com\/idea\/\" title=\"IntelliJ IDEA\" rel=\"homepage\">IntelliJ<\/a> in the fast lane.  So without further ado, here&#8217;s the top places I&#8217;ve found and things I know.<\/p>\n<h2> Links on the IntelliJ site:<\/h2>\n<ol>\n<li><strong>1. <\/strong><a href=\"http:\/\/www.jetbrains.com\/idea\/documentation\/documentation.html\">The main documentation page<\/a><\/li>\n<li><strong>2.<\/strong> <a href=\"http:\/\/www.jetbrains.com\/idea\/training\/demos.html\">Demos and tutorials<\/a> including a couple of new Groovy support demonstrations<\/li>\n<li><strong>3. <\/strong><a href=\"http:\/\/www.jetbrains.com\/idea\/features\/25-can.html\">25 things you can do with IntelliJ 8 you can&#8217;t do with 7<\/a><\/li>\n<li><strong>4.<\/strong> <a href=\"http:\/\/www.jetbrains.com\/idea\/docs\/IntelliJIDEA8_ReferenceCard_Mac.pdf\">Mac Keymap reference<\/a><\/li>\n<li><strong>5.<\/strong> <a href=\"http:\/\/www.jetbrains.com\/idea\/docs\/IntelliJIDEA8_ReferenceCard.pdf\">Windows\/Linux keymap reference<\/a><\/li>\n<li><strong>6.<\/strong> <a href=\"http:\/\/blogs.jetbrains.com\/idea\/\">The Jetbrains IntelliJ blog.<\/a> A great way of getting tips from the guys that wrote it, and keeping up to date with improvements.<\/li>\n<\/ol>\n<h2>DZone: Intellij in 7 pages<\/h2>\n<ol>\n<li><strong>7.<\/strong> <a href=\"http:\/\/refcardz.dzone.com\/refcardz\/intellij-idea-update\">The DZone refcard for Intellij<\/a><\/li>\n<\/ol>\n<h2>My personal faves<\/h2>\n<ol>\n<li><strong>8.<\/strong> Command Shift-A to bring up a search window for actions. This one I think of as <a class=\"zem_slink\" href=\"http:\/\/www.blacktree.com\/\" title=\"Quicksilver (software)\" rel=\"homepage\">Quicksilver<\/a> for my IDE.<\/li>\n<li><strong>9.<\/strong> Alt-Enter to trigger intentions. Problem with your code? Let the IDE suggest a refactor to correct it.<\/li>\n<li><strong>10.<\/strong>  Ctrl-n for auto-generation of <a class=\"zem_slink\" href=\"http:\/\/java.sun.com\" title=\"Java (software platform)\" rel=\"homepage\">Java<\/a> code. Getter and setter boilerplate getting you down(and you can&#8217;t switch from Java to Groovy)? Want a nice compact toString() on a class with 20 member variables? Let the IDE do the heavy lifting.<\/li>\n<li><strong>11.<\/strong>  The Javadoc Sync plugin. This goes well with #10 to javadoc all those getters and setters auto-magically.<\/li>\n<\/ol>\n<h2>Add logging using the debugger<\/h2>\n<ol>\n<li><strong>12.<\/strong> Printing to the console is a basic tool for debugging code. Everybody&#8217;s done it &#8211; because it&#8217;s easy and it works. But you often come across scenarios that disallow this quick and satisfying hackish behaviour. Namely when you are debugging into code in a library, this is not necessarily an easy option. Fortunately IntelliJ provides a nice easy way to add console logging through the debugger. You can access the breakpoint configuration dialog either by right clicking on an existing line breakpoint and selecting &#8216;Properties&#8217; or by pressing Command Shift-F8 from the Debug view. From there you configure your line or Exception breakpoint with a &#8216;Suspend policy&#8217; of &#8216;None&#8217; and check the boxes under &#8216;Actions&#8217; to enable logging. A full description of the features can be <a href=\"http:\/\/www.jetbrains.com\/idea\/webhelp\/configuring-breakpoints.html?permalink\">found here<\/a>.\n<\/p>\n<p> I find this especially handy when there&#8217;s a problem iterating over a Collection and only one or some of the items in that Collection lead to an error condition during processing. Using this strategy I can provide context as to which cases passed and which failed without having to stop at a bunch of breakpoints and inspect the variables on the stack; I can just concentrate on the failure point and look back at the console output to compare against previous invocations.<br \/>\nHere&#8217;s a couple of screencaps to show configuration for logging the size of a list on a line breakpoint. Note that the Groovy requires a little bit of extra magic, since the debugger gets passed a <a href=\"http:\/\/groovy.codehaus.org\/api\/groovy\/lang\/Reference.html\">Reference<\/a> object instead of the raw List.<\/li>\n<\/ol>\nngg_shortcode_0_placeholder\n<h2>Bonus from the Community<\/h2>\n<ol>\n<li><strong>13.<\/strong> <a href=\"http:\/\/jetbrains.dzone.com\/articles\/grails-12-creates-intellij\">Grails returning the favor for the great IntelliJ support.<\/a><\/li>\n<\/ol>\n<h1>How about you?<\/h1>\n<ol>\n<li><strong>14.<\/strong> Do you know any other good places to learn about IntelliJ and how to get the most out of it? Please don&#8217;t keep it to yourself! I managed to line up a baker&#8217;s dozen, now you&#8217;re on the hook for number 14 smart guy.<\/li>\n<\/ol>\n<div class=\"zemanta-pixie\"><a class=\"zemanta-pixie-a\" href=\"http:\/\/reblog.zemanta.com\/zemified\/60aa60c1-1727-4e9c-9c03-3f9f4094636b\/\" title=\"Reblog this post [with Zemanta]\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"zemanta-pixie-img\" src=\"https:\/\/i0.wp.com\/img.zemanta.com\/reblog_c.png\" alt=\"Reblog this post [with Zemanta]\" \/><\/a><span class=\"zem-script more-related pretty-attribution\"><script type=\"text\/javascript\" src=\"http:\/\/static.zemanta.com\/readside\/loader.js\" defer=\"defer\"><\/script><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today at work I was reminded that I didn&#8217;t learn how to use my IDE overnight, and that I&#8217;ve been greedily hoarding where I found good resources for learning how to drive IntelliJ in the fast lane. So without further ado, here&#8217;s the top places I&#8217;ve found and things I know. Links on the IntelliJ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[123,122,259,257,103,14,258,35,124],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-dev","tag-debugger","tag-development-tools","tag-grails","tag-groovy","tag-integrated-development-environment","tag-intellij-idea","tag-java","tag-programming","tag-tips-and-tricks"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prjtg-a0","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/comments?post=620"}],"version-history":[{"count":34,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions"}],"predecessor-version":[{"id":656,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions\/656"}],"wp:attachment":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/media?parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/categories?post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/tags?post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}