<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rich Internet Applications (RIA) &#187; Grails</title>
	<atom:link href="http://www.canoo.com/blog/category/grails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.canoo.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 14:30:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>JavaOne 2011 Thursday and wrap-up</title>
		<link>http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/</link>
		<comments>http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 05:15:10 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[JavaOne]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[canoo]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Dierk König]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=2291</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/";</script>Opinions expressed in the post are solely my own and not necessarily those of my employer. Thursday started with the Community Keynote. Well, it actually started with a 25 minutes IBM presentation about their cloud story. This had obviously nothing to do with the topic of the event and later speakers pointed this out rather [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/";</script><div id="_mcePaste"><em>Opinions expressed in the post are solely my own and not necessarily those of my employer.</em></div>
<div><em><br />
</em></div>
<div>Thursday started with the Community Keynote. Well, it actually started with a 25 minutes IBM presentation about their cloud story. This had obviously nothing to do with the topic of the event and later speakers pointed this out rather frankly. At least it was interesting to hear that there is a job title like &#8220;Cloud Architect&#8221;.</div>
<div id="_mcePaste">The real part of the Community Keynote started with a <em>quiet moment to honor Steve Jobs</em>.</div>
<div id="_mcePaste">Later on, various winners of the Duke choice award and JUG luminaries cared for a lighter mood again, presented their work and asked the audience for participation in their local JUGs and in the advancement of Java via the OpendJDK. The JavaPosse appeared on stage and presented a funny show.</div>
<div id="_mcePaste">It was also announced that many of the JavaOne talks will be available on parleys.com, which provide by far the best experience when it comes to viewing live-captured talks.</div>
<div id="_mcePaste">Afterwards I attended the ZeroTurnaround (JRebel) talk on classloader issues. The rather big room (~300 ppl) was packed and left the impression that many Java developers share a common pain around classloaders. It was a good talk, covering the basics and typical pifalls. The only surprise for me was *how* easily you can end up with a classloader leak.</div>
<div id="_mcePaste">In order to improve my fathering skills, I went into Ken Sipe&#8217;s talk on &#8220;Rocking the Gradle&#8221;, where I met Adam Bien. Ken is a great presenter. However, convincing the crowd is a challenge especially as many Maven users seem to suffer from the Stockholm syndrome.</div>
<div id="_mcePaste">Then onto &#8220;Visualization of Geomaps and Topic Maps with JavaFX 2.0&#8243;, which had some interesting visuals captured <a href="http://www.lodgon.com/lodgon/NEWS/Artikelen/2010/9/22_Our_CTO_presented_a_JavaOne_session_on_JavaFX.html">here</a>.</div>
<div>For me JavaOne 2011 finished with Jim Clarke and Dean Iverson on GroovyFX, where they made some really good points suggesting that Groovy is the best language to drive the JavaFX 2.0 API.</div>
<div>As a side note, James Weaver introduced me to Jim Clarke by pointing out &#8220;He is from *<strong>Canoo</strong>*&#8221;. Then the discussion went into how well-known Canoo is in the community and that all employees must be true geniuses to achieve so much with so few people <img src='http://www.canoo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
<div>Fazit: Still, JavaOne is nowhere near where it was before the Oracle acquisition both in terms of size and in terms of being an unparalleled community experience. Distribution all over various hotels just doesn&#8217;t feel right. However, meeting friends has been and still remains the most important part of JavaOne and the conference still delivers on that account.</div>
<div id="_mcePaste">Important topics were new Java versions, JavaEE (+cloud), and Java for the Desktop with 50+ talks on JavaFX. Whenever the audience was asked about which alternative languages they use, Groovy was the clear winner. It appears that in the mainstream, Groovy has become the default choice for dynamic programming on the JVM.</div>
<div id="_mcePaste">The topic of concurrent programming was in my eyes underrepresented. Guillaume and myself had simple usage of GPars in our demos but for such a big and increasingly important topic the coverage should be much more extensive.</div>
<div>Finally, some visual impressions.</div>
<div>Good-bye SF</div>
<div>Dierk Koenig</div>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-01.jpg"><img class="alignnone size-medium wp-image-2292" title="j1-01" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-01-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-02.jpg"><img class="alignnone size-medium wp-image-2293" title="j1-02" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-02-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-03.jpg"><img class="alignnone size-medium wp-image-2294" title="j1-03" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-03-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-04.jpg"><img class="alignnone size-medium wp-image-2295" title="j1-04" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-04-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-17.jpg"><img class="alignnone size-medium wp-image-2296" title="j1-17" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-17-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-25.jpg"><img class="alignnone size-medium wp-image-2297" title="j1-25" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-25-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-27.jpg"><img class="alignnone size-medium wp-image-2298" title="j1-27" src="http://www.canoo.com/blog/wp-content/uploads/2011/10/j1-27-300x225.jpg" alt="" width="300" height="225" /></a></p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/10/07/javaone-2011-thursday-and-wrap-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne 2011 Wednesday</title>
		<link>http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/</link>
		<comments>http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:11:44 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaOne]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[Dierk König]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=2286</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/";</script>Opinions expressed in this post are totally my own and not necessarily that of my employer. Wednesday started with the infamous &#8220;scriptbowl&#8221;, a competition between various scripting languages. This year the contenters were JRuby, Groovy, Scala, and Clojure. I wondered whether Scala considers itself a scripting language but obviously they either do or just seek [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/";</script><p><em>Opinions expressed in this post are totally my own and not necessarily that of my employer.</em></p>
<p>Wednesday started with the infamous &#8220;scriptbowl&#8221;, a competition between various scripting languages. This year the contenters were JRuby, Groovy, Scala, and Clojure. I wondered whether Scala considers itself a scripting language but obviously they either do or just seek the opportunity to be on stage.</p>
<p>To keep a long story short: <strong>Groovy has won this event for the third time in a row</strong>! This year the race was tied with Scala. Guillaume presented Groovy in the typical Groovy-idomatic style and explained every single line of his concurrent visual analyzer for Google+ postings. Dick Wall presented only non-idomatic Scala code. I interpret this as: to make Scala appealing you have to make it look like Groovy. Furthermore, he presented Kojo, which is a great interactive learning environment written in Play/Scala. In contrast to all other presentations, this was not specifically created for the scriptbowl, nor was it written by the presenter, nor was it clear how much effort went into it, nor did the audience see a single line the implementation code. How much this skewed the comparison, I leave to everybody&#8217;s judgement. The show was good, though.</p>
<p>I felt a bit sorry for Clojure. It is a great language and deserves a presentation that is more visually appealing to convince the crowd.</p>
<p>Afterwards, I attended a hands-on lab for &#8220;rapid enterprise development with netbeans&#8221;, which was essentially creating a Swing app for database CRUD actions. If I remember correctly, I did the exact same task 1997 with JBuilder. It left me with the feeling of &#8220;Yes, it works&#8221; but it is not less complex than it was 13 years ago.</p>
<p>Early afternoon Gerrit Grunwald (better known as @hansolo_) presented his work on simplified custom components for Swing. Given that he speaks about an activity that is both utterly important and highly underadvertised he would really deserve speaking at the center stage.</p>
<p>Graeme Rocher&#8217;s great session about Grails, polyglot datastores (hibernate, jpa, redis, mongodb, &#8230;), and the cloud was overshadowed by the news that Steve Jobs has died. Accidentally, the demo application was about showing a BBC News stream, which displayed this information live on stage. Both the presenter and the audience were equally touched.</p>
<p>The day officially ended with a big event at treasure island. I decided to not go there, though, and meet the former Canooey Denis Antonioli in Berkely where we had a great evening.</p>
<p>Dierk Koenig</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/10/06/javaone-2011-wednesday/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA 10.5 for the Groovy and Grails Developer</title>
		<link>http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/</link>
		<comments>http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/#comments</comments>
		<pubDate>Mon, 23 May 2011 13:54:41 +0000</pubDate>
		<dc:creator>Hamlet</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[hamlet]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=2136</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/";</script>The formal release of IntelliJ IDEA 10.5 came out this month, and the new Groovy features are all part of the free and open source Community Edition, and the Grails features are part of the Ultimate Edition. IDEA X (or 10 to you non-Romans) was a larger release of the product, and I already blogged [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/";</script><p>The formal release of <a href="http://www.jetbrains.com/idea/whatsnew/">IntelliJ IDEA 10.5</a> came out this month, and the new Groovy features are all part of the free and open source Community Edition, and the Grails features are part of the Ultimate Edition. IDEA X (or 10 to you non-Romans) was a larger release of the product, and I already blogged about <a href="http://www.canoo.com/blog/2010/12/20/intellij-idea-x-for-groovy-developers/">IDEA X for Groovy</a> and <a href="http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/">IDEA X for Grails</a>. There&#8217;s still plenty of nice features in 10.5 though. The prices for IDEA recently dropped between $100 and $50, and anyone purchasing IDEA since last November gets 10.5 as a free upgrade.</p>
<p>Here&#8217;s what 10.5 is all about (or skip straight to the <a href="http://confluence.jetbrains.net/display/IDEADEV/IDEA+10.5+RC+Release+Notes">release notes</a>).</p>
<p><strong>Groovy 1.8 Support</strong><br />
A big push in IDEA 10.5 was Groovy 1.8 support. Groovy 1.8 contains many compile time AST transformations that do things like write out new methods and fields into the Groovy .class files. Normal IDEs will show in-IDE compile errors when using these annotations yet still allow you to compile and execute the script. This has been fixed in IDEA, so the IDE should give you proper code completion and support when you use <a href="http://groovy.codehaus.org/gapi/groovy/transform/Field.html">@Field</a>, <a href="http://groovy.codehaus.org/gapi/groovy/transform/TupleConstructor.html">@TupleConstructor</a>, and <a href="http://www.canoo.com/blog/2010/09/20/log-groovys-new-and-extensible-logging-conveniences/">@Log</a>. This is especially helpful when invoking these synthetic members from Java code.</p>
<p><strong>Introduce Parameter and Introduce Field Refactorings</strong><br />
Introduce Parameter is one of my favorite refactorings. Select a local variable within a method, press Ctrl+Alt+P, and the local variable is extracted into a method parameter. It doesn&#8217;t <em>yet</em> work for closures, but you can <a href="http://youtrack.jetbrains.net/issue/IDEA-70064">vote for that feature</a>. Introduce Field is also handy: select a local variable in either a method <em>or a closure</em>, press Ctrl+Alt+F, and the local variable is extracted into a field on the enclosing class. IDEA is not capable of extracting a field in a script yet, which would logically create an <a href="http://groovy.codehaus.org/gapi/groovy/transform/Field.html">@Field</a> script field, but feel free to <a href="http://youtrack.jetbrains.net/issue/IDEA-70065">upvote the issue</a>.</p>
<p><strong>Go To Test (and vice versa) Support</strong><br />
Tests and production source follows a naming convention, for example MyClass and MyClassTest. You can now press Ctrl+Shift+T to jump to the test (if you&#8217;re in production code) or jump to the production code (if you&#8217;re in the test). And if there is no test, then it will prompt you to create a new one. This works great in most cases. Of course, with Groovy it is not so rare to have several top-level classes in a single source file. In these cases the feature can sometimes get confused. <a href="http://youtrack.jetbrains.net/issue/IDEA-70036">Upvote the fix here</a> if you want it to be just that much smarter in the future.</p>
<p><strong>More Code Completion and Intentions</strong><br />
The &#8220;add static import&#8221; intention is nice for those who use a lot of static imports. Just set your cursor in a constant referenced from your code, press Alt+Enter, and viola&#8230; the constant is statically imported. Also, code completion is now available when creating an object using named parameters, which makes them a little easier to use. A whole bunch of other code completion issues were fixed as well, but these were technically marked as bugs not features. You can always peruse the release notes to see the whole story.</p>
<p><strong>Performance</strong><br />
JetBrains claims that file indexing (typically at IDE startup) is now faster and that working with large Groovy files is more performant. It is hard for me to see a difference since I use the EAP versions and don&#8217;t currently work on any massive projects currently.</p>
<p><strong>Grails Code Generation &amp; Completion</strong> (Ultimate Edition)<br />
Some small but nice things here. If you reference a controller action from a GSP, and that action does not exist, then pressing Alt+Enter creates an empty action for you. Also, the type inference for values on the GrailsPlugins has been improved, such as the closure parameters for doWithApplicationContext, doWithDynamicMethods, etc, and code completion for controllers and action in custom plugins are now discovered automatically. Finally, the code inside &lt;r:script&gt; tags from the <a href="http://grails.org/plugin/resources">Grails Resource plugin</a> is now parsed as JavaScript, so full IDE JavaScript is available within them. This is supposed to become a standard for Grails 1.4, so it should continue to work with that release.</p>
<p><strong>Improved Grails Resource Bundle and i18n Support</strong><br />
With 10.5, if you reference a property using the &lt;g:message&gt; tag in a GSP, and that property does not exist, then the property will be underlined in red and you&#8217;ll be given an Alt+Enter Intention to create it for you. Nifty. Also, the existing i18n intentions should now work better when you have GString syntax in your text. For instance, the string &#8220;Hello, ${user}&#8221; should now be properly handled when extracting to a resource bundle.</p>
<p><strong>Various Usability Improvements</strong><br />
Last on the list are a few odds and ends around usability. Closures can now have the separator line between them in the IDE, the way methods show a line between them. GSP stacktraces have correct (and clickable) hyperlinks. The scripts folder is visible in the Grails view. And code navigation and formatting has been improved for several Grails Artefacts.</p>
<p>That&#8217;s it. Enjoy the upgrade, may your solid state disk never fail, and may your caches always be valid. Caio!</p>
<p>If you like this sort of thing, then there is also a whole bunch of other IDEA related content on <a href="http://hamletdarcy.blogspot.com/search/label/IDEA">my own blog</a> and on <a href="http://www.canoo.com/blog/tag/idea/">the Canoo blog</a>. Enjoy.</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/05/23/intellij-idea-10-5-for-the-groovy-and-grails-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDEA series (ix) selective actions</title>
		<link>http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/</link>
		<comments>http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 21:39:32 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1882</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/";</script>Working with selections Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl) We have seen the editing support for lines, combined with selections. This part [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/";</script><div id="_mcePaste"><strong>Working with selections</strong></div>
<div><strong><br />
</strong></div>
<div id="_mcePaste"><em>Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl)</em></div>
<div><em><br />
</em></div>
<div id="_mcePaste">We have seen the editing support for lines, combined with selections. This part is more specifically about working with selections.</div>
<div></div>
<div id="_mcePaste"><strong>know your keyboard navigation</strong></div>
<blockquote>
<div id="_mcePaste">first of all, it is very helpful to familiarize yourself with your OS-specific keyboard commands for moving the cursor around and with the <strong>Shift</strong> key pressed, doing a selection. On Mac that is <strong>Cmd <em>left</em>/<em>right</em></strong> for begin/end of line and <strong>Alt <em>left</em>/<em>right</em></strong> for jumping over words. Of course you can use the mouse for selections but once you master the keystrokes, you will be faster and more precise.</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd W</strong> (<strong>Shift</strong> for reverse)</div>
<blockquote>
<div id="_mcePaste">is <strong>w</strong>idening the current selection. That is, if you already have a selection, it expands it to the next enclosing syntactical scope (expression, statement, block). Without a selection, it starts a selection at the caret.</div>
</blockquote>
<blockquote>
<div id="_mcePaste">Mac users may expect <strong>Cmd W</strong> to close the current editor (internal window) as typical for mac applications, but that functionality is mapped to <strong>Cmd F4</strong> in the standard keymap (somehow resembles the Windows keystroke).</div>
</blockquote>
<blockquote>
<div id="_mcePaste">I use widening most of the time to select a small expression precisely &#8211; often for later use in a refactoring. I start in the middle of the code and hit <strong>Cmd W</strong> repeatedly.</div>
<div id="_mcePaste">When selecting a larger block, let&#8217;s say a method or a whole class body, it&#8217;s efficient to place the cursor <em>just after the opening brace</em> and hit <strong>Cmd W</strong> just once to select the whole block.</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd Alt T</strong></div>
<blockquote>
<div id="_mcePaste">surrounds the selection (or current line if there is no selection) with a live <strong>t</strong>emplate. This features spares you the need for fiddling around with cursor positioning to put some code into an &#8220;if&#8221; block and the likes. I even made my own templates for surrounding a selection with parentheses, brackets (to make a literal Groovy list), braces (to make a closure or block), single quotes, and double quotes.</div>
<div><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/SurroundWith.png"><img class="alignnone size-full wp-image-1883" title="SurroundWith" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/SurroundWith.png" alt="" width="281" height="461" /></a></div>
<div id="_mcePaste">Especially putting quotes around a selection is nice since otherwise IDEA sometimes inserts pairs of quotes when it shouldn&#8217;t.</div>
</blockquote>
<div id="_mcePaste"><strong>Context menu -&gt; Compare with Clipboard</strong></div>
<blockquote>
<div id="_mcePaste">when you have a selection and open the context menu (<em>right mouse click</em>) you&#8217;ll see a &#8220;<em>Compare with clipboard</em>&#8221; entry, which opens the internal diffing view. Nice.</div>
</blockquote>
<div id="_mcePaste">keep groovin&#8217;</div>
<div id="_mcePaste">Dierk</div>
<div id="_mcePaste">@mittie</div>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/12/idea-series-ix-selective-actions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IDEA series (viii) line management</title>
		<link>http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/</link>
		<comments>http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 16:33:15 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1878</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/";</script>Rethinking your line management (pun intended) Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl) This series has come to the point where we do [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/";</script><div id="_mcePaste"><strong>Rethinking your line management (pun intended)</strong></div>
<div id="_mcePaste"><em>Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl)</em></div>
<div><em><br />
</em></div>
<div id="_mcePaste">This series has come to the point where we do the actual editing of the code and we start with working on the <strong>current line</strong>. That is, the actions below work on the current line where the caret is positioned in. When it says &#8220;or selection&#8221; then the action works on the current selection if there is any and on the current line otherwise.</div>
<div id="_mcePaste"><strong>Cmd Y</strong></div>
<blockquote>
<div><strong>y</strong>anks out the current line. I use this a lot. It is quicker than selecting and deleting even when yanking many lines, since you can simply press the same keystroke again (remember the discussion about interaction design?).</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd D</strong></div>
<blockquote>
<div id="_mcePaste"><strong>d</strong>uplicate the current line (or selection). Again, a much used shortcut for me for making variants of the current line or selection. Some Eclipse converts take issue with this one since they expect a delete action. (It&#8217;s worse when you get from IDEA to Eclipse and mistakingly delete a line that you want to duplicate, but then you deserve the pain)</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd /</strong></div>
<blockquote>
<div id="_mcePaste">comments the current line or selection with a line comment (//). This has a little gotcha when working with non-english keyboards where you need to press Shift to get to the slash character. With my swiss-german layout the shortcut is actually <strong>Cmd .</strong> (dot) because the dot is where the slash is on english keyboards (see also http://youtrack.jetbrains.net/issue/IDEA-63779).</div>
</blockquote>
<div id="_mcePaste"><strong>Ctrl Shift J</strong></div>
<blockquote>
<div id="_mcePaste"><strong>j</strong>oin the current line with next line. This shortcut is used by many text-editors. It is worth remembering. Much faster than a manual join.</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd Shift <em>up</em>/<em>down</em></strong></div>
<blockquote>
<div id="_mcePaste">moves the current line (or selection) one line up or down. This used to have issues in older versions when it tried to be too clever about which lines to jump over, e.g. when you select a whole method, it jumps not per-line but per-method. This makes sense for methods but other blocks are not as easy to support since you may want to nest them. The &#8220;intelligent&#8221; jumping sometimes led to unexpected results, especially in Groovy code. I haven&#8217;t seen any trouble with version X, yet.</div>
</blockquote>
<div id="_mcePaste"><strong>Cmd Alt V</strong></div>
<blockquote>
<div id="_mcePaste">the &#8220;insert explaining variable&#8221; refactoring is something you normally call on a selected expression but when there is no selection, it takes the current line as the expression. Now, this has an interesting effect: in a variable assignment, you never have to write the left-hand side! I learned this from IDEA uber-guru Vaclav Pech himself. It works like this: you don&#8217;t type &#8220;<em>MyType myRef = expression</em>&#8221; but only &#8220;<em>expression</em>&#8221; then strike <strong>Cmd Alt V</strong>. Try this and enjoy the effect.</div>
</blockquote>
<div id="_mcePaste">keep groovin&#8217;</div>
<div id="_mcePaste">Dierk</div>
<div id="_mcePaste">@mittie</div>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/11/idea-series-viii-line-management/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA series (vii)</title>
		<link>http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/</link>
		<comments>http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 13:46:17 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1865</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/";</script>helpful selection modes and type inference Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl) With only a few keystrokes it becomes much easier to [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/";</script><p><strong>helpful selection modes and type inference</strong></p>
<p><em>Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout and default keymap, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl)</em></p>
<p>With only a few keystrokes it becomes much easier to move code around in your editor or gather more information.</p>
<p>Press the <strong>Alt</strong> key while selecting with the mouse</p>
<blockquote><p>and the selection is in &#8220;column&#8221; mode. Very useful for many well-formatted source files and often even more in resource files with tabular format.</p></blockquote>
<p><strong>Column mode</strong></p>
<blockquote><p>can also be toggled with a keystroke. I couldn&#8217;t quite remember the default keystroke, so I&#8217;ve set it to Cmd Alt Backspace. To find your keystroke look in the <em>Edit</em> menu under <em>Column Mode</em> (or as always use <strong>Cmd Shift A</strong> and type &#8220;col&#8221;).</p></blockquote>
<p>Hold <strong>Cmd</strong> while <strong>hovering</strong> over a reference</p>
<blockquote><p>and you will see the inferred type like so:</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/TypeInference.png"><img class="alignnone size-full wp-image-1866" title="TypeInference" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/TypeInference.png" alt="" width="614" height="186" /></a></p>
<p>Note that this is Groovy code and from the content of the dynamically typed <em>myMap</em>, IDEA infers that this is a <em>Map</em> from <em>Strings</em> to <em>Integers</em>, i.e. not only the raw type is inferred but also the generic type! Is that cool or is that cool?</p></blockquote>
<p>We touch a very important topic here.</p>
<p>Many developers are under the misconception that IDEs can only do what the compiler of a specific language does. The Groovy compiler does no type inference but still, IDEA does and uses this info for code completion, analysis, refactorings, warnings on mistyped method names, and so on.</p>
<p>This shouldn&#8217;t come as a big surprise. Even for Java, IDEs do a lot more analysis than what the Java compiler does.</p>
<p>Using a dynamic language like Groovy does not mean that you lose all the IDE support (as you can hear occasionally). Also note that in Groovy you can always declare your types, making it an optionally typed language.<br />
Inside IDEA, you can seamlessly switch between Groovy and Java, using cross-language testing, debugging, analysis tools, and refactoring.</p>
<p>The next post will be about more editing commands.</p>
<p>keep groovin&#8217;<br />
Dierk<br />
@mittie</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/10/intellij-idea-series-vii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA series (vi)</title>
		<link>http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/</link>
		<comments>http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 17:41:00 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1853</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/";</script>Understanding dependencies &#8211; a smooth intro Beside all the navigation, editing, and refactoring goodness that IDEA brings to the table, there is one feature that I really adore and find under-utilized by most teams: the dependency structure matrix (DSM). It seems that many developers shy away because they expect it to be difficult, while in [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/";</script><p><strong>Understanding dependencies &#8211; a smooth intro</strong></p>
<p>Beside all the navigation, editing, and refactoring goodness that IDEA brings to the table, there is one feature that I really adore and find under-utilized by most teams: the <strong>dependency structure matrix</strong> (<strong>DSM</strong>).</p>
<p>It seems that many developers shy away because they expect it to be difficult, while in fact it is easy to understand and remember with just a little bit of intro. Here it comes.</p>
<p><strong>Prerequisites</strong>: your project must compile. That&#8217;s it.</p>
<p><strong>How to start</strong>: from the <em>Analyze</em> menu choose <em>Analyze Dependency Matrix</em>.</p>
<p>This is what you see (this is the code from my personal wiki &#8211; yes, it has only 5 classes. The code is under github.com/Dierk/MittieWiki)</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/Initial.png"><img class="alignnone size-full wp-image-1855" title="Initial" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/Initial.png" alt="" width="300" height="155" /></a></p>
<p>Now, what does this mean? Well, it actually shows the <em>layering of your architecture</em> &#8211; not how you want it to be but how it actually <em>is</em>.</p>
<p>How would you depict the architectural layers in a document? Probably as some kind of pyramid with the common functionality as the fundamental bottom layers and users of the infrastructure on top of it. The DSM is exactly that!</p>
<blockquote><p>If you want, you can imagine the pyramid being slightly pushed to the left such that the left edges align. Then you have exactly the lower-left triangle of the DSM. The upper layers depend on what is below them. They use the common base functionality.<br />
The common base layers use nothing, therefore they go to the bottom. The uppermost layers are used by nobody.</p></blockquote>
<p>For the moment, we don&#8217;t look at the numbers since we only seek to <strong>understand the structure</strong>.</p>
<p>The structure of the DSM shows that <em>EventController</em> (second line) uses classes below it. But which ones? Simply click on the <em>EventController</em> label and you will see this picture:</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/uses.png"><img class="alignnone size-full wp-image-1857" title="uses" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/uses.png" alt="" width="300" height="152" /></a></p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/uses.png"></a>Every class that <em>EventController</em> actually uses gets an <strong>orange marker</strong>. Do yo see the one at <em>CookService</em>? From that we can tell that <em>EventController</em> uses <em>CookService</em> and <strong>no other</strong> project class!</p>
<p>CookService seems to be an interesting class. So let&#8217;s click on its label:</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/usedBy.png"><img class="alignnone size-full wp-image-1858" title="usedBy" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/usedBy.png" alt="" width="301" height="151" /></a></p>
<p>Do you see the green markers? They tell that CookService is <strong>used by</strong> <em>EventController</em>, <em>FindController</em>, and <em>PageController</em>.</p>
<blockquote><p>From this intro you can infer that green markers should always be above the current selection and orange ones below.</p></blockquote>
<p><strong>Understanding the numbers</strong></p>
<p>The numbers quite obviously show how often a class uses some other class. But which cell contains this information? Well, if you think about it, there is only one possible way of arranging numbers in cells that makes sense. Let&#8217;s revisit</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/uses.png"><img class="alignnone size-full wp-image-1857" title="uses" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/uses.png" alt="" width="300" height="152" /></a></p>
<p>The blue cross covers the number 5 saying that <em>EventController</em> uses <em>CookService</em> 5 times.</p>
<blockquote><p>I mean, you only use classes below yourself, that means a cell that tells how often you use it must necessarily be placed below you, right? And where else should it be than in the row of the used class? And it is quite obviously in the column that responds to the using class.<br />
The columns are not labeled explicitely but they are in same sequence as the rows and therefore you can simply use the diagonal as a &#8220;mirror&#8221;.</p></blockquote>
<p>Fazit: <strong>usages</strong> along with usage counts are shown <strong>in the column below the diagonal</strong>!</p>
<p>With this knowledge we can anticipate what happens when we select the other controller classes. They equally show 5 usages of <em>CookService</em>.</p>
<p>Now, think in the opposite direction. <strong>Who uses our class</strong>?</p>
<p><em>EventController</em> uses <em>CookService</em> 5 times. In other words: <em>CookService</em> is <strong>used by</strong> <em>EventController</em> 5 times. And the same is true for <em>FindController</em> and <em>PageController</em>. That&#8217;s three times the used-by count of 5 in the same row. This means: <strong>used-by</strong> along with its counts is shown <strong>in the row of the used class</strong>!</p>
<p>In cases where the situation is less obvious, you can select a single cell (here where the 5 is in) to see the whole picture:</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/cellSelection.png"><img class="alignnone size-full wp-image-1859" title="cellSelection" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/cellSelection.png" alt="" width="299" height="151" /></a></p>
<p>So much for the intro.</p>
<p>A very comprehensive description with many use cases and screencasts is under http://www.jetbrains.com/idea/features/dependency_analysis.html . You will see that this intro helps you understanding it. Once you have understood the concept, you will easily grasp package dependencies, module dependencies, and cyclic references.</p>
<p>The DSM has become an indispensable tool for my consulting work. Whenever I visit a new project, it is my first tool to fire up. There is so much to tell from this simple matrix.</p>
<p>After a while, you start to see patterns like a horizontal line of dependencies (as in <em>CookService</em>) to show a service or utility class or a line just below the diagonal to show a strict layering, breaches of layering, and so on.</p>
<p><strong>A word of caution</strong></p>
<blockquote><p>Static analysis never shows the whole truth. Especially, it doesn&#8217;t show <em>semantic</em> dependencies. Just recently I heard a friend advocating the use of dependency injection to avoid unwanted dependencies in the DSM. It is very easy to fool oneself with that approach if the <em>semantic</em> dependency is not resolved at the same time.<br />
Actually, I&#8217;d rather like to see my unwanted dependencies in the DSM than hiding it with tricks (DI, AOP, &#8220;Object&#8221; in signatures, &#8220;def&#8221; in Groovy).</p></blockquote>
<p>I hope this little intro motivated you to give the DSM a try.</p>
<p>keep groovin&#8217;<br />
Dierk<br />
@mittie<br />
dzone: http://www.dzone.com/links/r/intellij_idea_tips.html</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/09/intellij-idea-series-vi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA series (IV) interaction design</title>
		<link>http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/</link>
		<comments>http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 22:09:11 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1837</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/";</script>Caution: this post contains philosophical content! (at least some readers call it so when I reflect on what makes software great) Please note that this is for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/";</script><p>Caution: this post contains philosophical content!<br />
(at least some readers call it so when I reflect on what makes software great)</p>
<p><em>Please note that this is for Groovy and Grails development on Mac   OS X with  Swiss-german keyboard layout, so the keybindings may differ   on your  machine. (For Windows, you most often can replace Cmd with   Ctrl)</em></p>
<p>Let&#8217;s start with a simple example.</p>
<p><strong>Cmd Shift A</strong></p>
<blockquote><p>pops up a simple text field (and one checkbox) where you can select from <strong>a</strong>ll <strong>a</strong>vailable <strong>a</strong>ctions in case you have forgotten the shortcut or its place in the menu tree. It appears like the picture below if you e.g. look for the dependency analysis features by entering &#8220;<em>Dep</em>&#8221;</p>
<p><a href="http://www.canoo.com/blog/wp-content/uploads/2011/01/allActions.png"><img class="alignnone size-full wp-image-1839" title="allActions" src="http://www.canoo.com/blog/wp-content/uploads/2011/01/allActions.png" alt="" width="378" height="223" /></a></p></blockquote>
<ul>
<li>First of all, this feature is immensely useful for itself. Especially, it is much quicker than scanning through the menus or reading through the help pages. Apple, Microsoft, could you please steal the idea for your software products?</li>
<li>Second, note how slick the search &#8220;dialog&#8221; is. You hardly recognize it as a dialog at all. Many other software products pester their users with ridiculously overloaden search dialogs. JetBrains learned from Google&#8217;s success: one entry field is enough.<br />
Providing many options to the user is actually the easy way. Taking the hard decisions of what <em>not</em> to show is the true mastery of interaction design.</li>
<li>Finally, the way that you narrow down the options is <strong>consistent</strong> throughout the whole application. Here is another example: use</li>
</ul>
<p><strong>Cmd ,</strong> (comma)</p>
<blockquote><p>to open the setting dialog. Now let&#8217;s assume that you want to enable the (very useful) feature to highlight all usages of the symbol that contains the text cursor (also known as &#8220;caret&#8221;). There are so many possible settings. How do I find the respective checkbox? Just start typing in the search field and the settings view narrows down the options and highlights the candidates.<br />
Try entering &#8220;highl&#8221; and you will see in the <em>Editor</em> section the checkbox &#8220;<em>Highlight usages of element at caret</em>&#8220;.</p></blockquote>
<p>The consistent availability of interaction concepts is key to a usability.</p>
<p>Here are some more of those consistent features. When used in differenct contexts, they may technically do totally different things but still serving a very similar user goal.</p>
<p><strong>F2 </strong>(<strong>Shift</strong> <strong>F2</strong> for backwards)</p>
<blockquote><p>jumps to the next error but also to the next inspection warning, i.e. the next point that requires your attention.</p></blockquote>
<p><strong>F3 </strong>(<strong>Shift</strong> <strong>F3</strong> for backwards)</p>
<blockquote><p>jumps to the next Find target (when you called the in-file finder with <strong>Cmd F</strong>) but also to the next usage of a symbol (when you used the &#8220;find all usages of symbol under caret&#8221; feature with <strong>Cmd Shift F7</strong>).</p></blockquote>
<p><strong>F4</strong></p>
<blockquote><p>from many different tools opens the selection in the editor and gives it the focus</p></blockquote>
<p><strong>F5</strong></p>
<blockquote><p>copy of classes or files, even <strong>Shift F5</strong> for the &#8220;clone&#8221; refactoring.</p></blockquote>
<p><strong>F6</strong></p>
<blockquote><p>move pretty much any OO construct anywhere. <strong>Shift F6</strong> for the &#8220;rename&#8221; refactoring.</p></blockquote>
<p>The point is that these actions are technically quite different in the different contexts but serve a similar purpose and so using the same shortcut is a consistent choice &#8211; easy to explain, easy to remember.</p>
<p>So much for today. It was a bit more contemplative than usual. However, I hope I could inspire you to recognize more of the interaction design of the applications that you use &#8211; and maybe even to pay more attention to the interaction design of the applications you build.</p>
<p>The next post will again be about hands-on tips.<br />
Dierk Koenig<br />
@mittie</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/07/intellij-idea-series-iv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA series (I) basic navigation</title>
		<link>http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/</link>
		<comments>http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 15:11:27 +0000</pubDate>
		<dc:creator>Dierk</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Dierk König]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1808</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/";</script>I have used IntelliJ IDEA since 2001 and I&#8217;m happy to share some of my experiences, useful shortcuts, lesser-known features, and useful personal settings. My descriptions apply to using IDEA X Ultimate almost exclusively for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout, so the keybindings may differ on your machine. [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/";</script><p>I have used IntelliJ IDEA since 2001 and I&#8217;m happy to share some of my experiences, useful shortcuts, lesser-known features, and useful personal settings. My descriptions apply to using IDEA X Ultimate almost exclusively for Groovy and Grails development on Mac OS X with Swiss-german keyboard layout, so the keybindings may differ on your machine. (For Windows, you most often can replace Cmd with Ctrl)</p>
<p>It is very tempting to show a looooong list of features and keybindings, but I rather keep the list very short to make it easier to digest, remember, or try yourself right away.</p>
<p>Let&#8217;s start with how I typically navigate the project.</p>
<p><strong>Cmd N</strong></p>
<blockquote><p>Finds a class by <strong>N</strong>ame. As with any lookup facility in IDEA, you can provide only parts of the classname, camel-case abbreviations, and wildcards. When the class is not found in the project, the libraries are searched.</p></blockquote>
<p><strong>Cmd Shift N</strong></p>
<blockquote><p>Same as Cmd N, but for files by <strong>N</strong>ame in the project, instead of classes. The &#8220;Shift&#8221;ed version of a short can generally be translated to &#8220;smart&#8221;.</p></blockquote>
<p><strong>Cmd Alt Shift N</strong></p>
<blockquote><p>I can hardly overemphasize how much I like that one! It&#8217;s a smart search for any member (field, method) in your codebase. And it is fast! How often did I asks myself: &#8220;I know there was a getMy&lt;Something&gt; method in the code somewhere, but where was it?&#8221; This shortcut has the answer.</p></blockquote>
<p><strong>Cmd click or Cmd B</strong></p>
<blockquote><p>To jump to the definition of the sym<strong>b</strong>ol under the cursor.</p></blockquote>
<p>Once you have navigated to some information, you often want to navigate back to your starting point. You can use</p>
<p><strong>Cmd Alt left/right</strong></p>
<blockquote><p>to navigate back and forth the navigation history or</p></blockquote>
<p><strong>Cmd Shift Backspace</strong></p>
<blockquote><p>to bring you <strong>back</strong> to the last edit point. I use that all the time. And it also has a history, i.e. when you hit the shortcut twice, it will bring you back to the last-but-one edit point.</p></blockquote>
<p>You can cover quite some ground with only these basic operations.</p>
<p>In the next post of this series, I will show some even more advanced navigation techniques.</p>
<p>keep groovin&#8217;<br />
Dierk</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2011/01/05/intellij-idea-series-i/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IDEA X for the Grails Developer</title>
		<link>http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/</link>
		<comments>http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 06:06:12 +0000</pubDate>
		<dc:creator>Hamlet</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[hamlet]]></category>
		<category><![CDATA[idea]]></category>

		<guid isPermaLink="false">http://www.canoo.com/blog/?p=1641</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/";</script>The new version of IntelliJ IDEA was released last week. I already blogged what IDEA X means for Groovy developers, and all of those features are obviously available to any Community Edition user (that&#8217;s the free one). This post looks at all the new Grails features available in the Ultimate Edition (the one you pay [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/";</script><p>The new version of <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a> was released last week. I already blogged what <a href="http://www.canoo.com/blog/2010/12/20/intellij-idea-x-for-groovy-developers/">IDEA X means for Groovy developers</a>, and all of those features are obviously available to any Community Edition user (that&#8217;s the free one). This post looks at all the new Grails features available in the Ultimate Edition (the one you pay for). These features are a little harder for me to try out personally as my current project is EJB3 and not Grails (someone save me please!). I&#8217;ve tried quite a few of them personally, but feedback is always welcome in case I miss or exaggerate something. Without further ado:</p>
<p><strong>Grails Aware IDE Features</strong></p>
<p><em>Better MVC Rename Refactoring</em> &#8211; Related artifacts are now renamed together, such as renaming a view when renaming a controller action, or renaming test cases when the main class changes (<a href="http://youtrack.jetbrains.net/issue/IDEA-45378">IDEA-45378</a>).</p>
<p><em>Functional-Test Plugin Support</em> &#8211; The Functional-Test plugin got some love, and support is the same as normal unit and integration tests (<a href="http://youtrack.jetbrains.net/issue/IDEA-51853">IDEA-51853</a>). Testing is good.</p>
<p><em>Filter Support</em> &#8211; There is a new action to easily create filters, code completion of actions and controllers works within the filter mapping code, and method like render() and getRequests() resolve from the filter body (<a href="http://youtrack.jetbrains.net/issue/IDEA-60331">IDEA-60331</a> and <a href="http://youtrack.jetbrains.net/issue/IDEA-60167">IDEA-60167</a>).</p>
<p><em>Mapping DSL Support </em>- In domain class mappings you now get code completion that is aware of HibernateMappingBuilder, and the rename refactoring is aware of the mappings (<a href="http://youtrack.jetbrains.net/issue/IDEA-49089">IDEA-49089</a>.</p>
<p><em>Constraint DSL Support</em> &#8211; Domain object constraints definitions now have code completion on common constraint names, completion on field names, and is correctly updated when using the Rename refacotring (<a href="http://youtrack.jetbrains.net/issue/IDEA-49115">IDEA-49115</a>).</p>
<p><em>Service and Bean Inference</em> &#8211; The names and types of services and beans can be inferred in controllers and other artifacts (<a href="http://youtrack.jetbrains.net/issue/IDEA-49111">IDEA-49111</a> and <a href="http://youtrack.jetbrains.net/issue/IDEA-45610">IDEA-45610</a>).</p>
<p><strong>GSP and View Improvements</strong></p>
<p><em> Easy Internationalization</em> &#8211; I love this. There&#8217;s a new intention in GSP files to move a static string into a message bundle. Alt+Enter does the trick. <a href="http://youtrack.jetbrains.net/issue/IDEA-44846">IDEA-44846</a> and <a href="http://youtrack.jetbrains.net/issue/IDEA-59519">IDEA-59519</a></p>
<p><em>Groovy Inspection Support</em> &#8211; In the past, only some Groovy inspections worked in GSP files. Support for more of the inspections have been added, like &#8220;divide by zero&#8221;, &#8220;double negation&#8221;, and &#8220;unresolved expression&#8221;. It&#8217;s not clear if <em>all</em> inspections are supported, but at least more are <a href="http://youtrack.jetbrains.net/issue/IDEA-50414">IDEA-50414</a></p>
<p><em>Better Variable Resolution</em> &#8211; References to controllers and controller properties are now resolved within GSP view pages. I assume this means at least control click navigation and code completion. See <a href="http://youtrack.jetbrains.net/issue/IDEA-49731">IDEA-49731</a> and <a href="http://youtrack.jetbrains.net/issue/IDEA-48692">IDEA-48692</a>. Also, release notes claim &#8220;Completion for value of action/controller parameters in built-in methods redirect(), render(), forward(), chain()&#8221;.</p>
<p><em>g:fieldValue Support </em>- g:fieldValue tags reference a field. Rename, completion, and find usages should all now work within the tag. <a href="http://youtrack.jetbrains.net/issue/IDEA-60858">IDEA-60858</a></p>
<p><em>Debugging in GSP </em>- Release notes claim &#8220;Preliminary debugging of GSP pages&#8221;. Not 100% sure what this means in practice.</p>
<p><em>JavaScript in Tags</em> &#8211; Release notes claim &#8220;support javascript in tags like &#8220;onSuccess&#8221;, &#8220;onFailure&#8221;, etc&#8221;. Again, I&#8217;m not sure what this means in practice.</p>
<p><strong>Find Usages</strong></p>
<p><em>Domain class fields </em>- Find usages for domain class fields has been improved. The ticket indicates that usages of fields within GORM dynamic queries are now supported (<a href="http://youtrack.jetbrains.net/issue/IDEA-58025">IDEA-58025</a>).</p>
<p><em>Variables from tags</em> &#8211; Find usage support for variables defined using a g:set tag within a GSP (<a href="http://youtrack.jetbrains.net/issue/IDEA-58185">IDEA-58185</a>).</p>
<p><em>Property Usages </em>- i18n message properties are now included in Find Usages, and the corresponding &#8220;unused property&#8221; inspections should be working (<a href="http://youtrack.jetbrains.net/issue/IDEA-52117">IDEA-52117</a>).</p>
<p><strong>Even More Code Completion</strong> &#8211; Besides what&#8217;s already been mentioned, we also have&#8230;</p>
<p><em>Model Aware GSPs </em>- Related to above, views are now aware of which model is returned from the controller, and autocomplete works for them. More info at <a href="http://youtrack.jetbrains.net/issue/IDEA-40926">IDEA-40926</a></p>
<p><em>Variable Aware GSPs</em> &#8211; When you define a variable in a GSP then IDEA now autocompletes it and stops pestering you for missing imports <a href="http://youtrack.jetbrains.net/issue/IDEA-50257">IDEA-50257</a></p>
<p><em>Attribute Aware GSPs</em> &#8211; Finally, code completion and navigation exists for the standard attributes: &#8220;action&#8221;, &#8220;controller&#8221;, &#8220;template&#8221;, &#8220;contextPath&#8221;, &#8220;plugin&#8221;, and well as variables defined in tags like g:each, g:set, etc.</p>
<p><em>And more, and more, and more</em> &#8211; There&#8217;s practically too many to list. Code completion works in <a href="http://youtrack.jetbrains.net/issue/IDEA-51414">type convertors</a>, in <a href="http://youtrack.jetbrains.net/issue/IDEA-57638">named queries</a>, in <a href="http://youtrack.jetbrains.net/issue/IDEA-51444">URL Mappings</a> and their <a href="http://youtrack.jetbrains.net/issue/IDEA-51444">GSP attribute values</a>, in <a href="http://youtrack.jetbrains.net/issue/IDEA-49052">scope objects</a> like servletContext, session, request, params, and flash (they also appear in the debugger as well), in views references from <a href="http://youtrack.jetbrains.net/issue/IDEA-48169">&#8216;render&#8217; and &#8216;redirect&#8217;</a> controller calls, and in <a href="http://youtrack.jetbrains.net/issue/IDEA-51390">hasOne mappings</a> which was missed in the last release.</p>
<p><strong>Grails Framework Support</strong></p>
<p><em>Gant Script Support </em>- IDEA is now aware than .groovy files in the scripts directory are Gant scripts. Targets are completed and imports are resolved better (<a href="http://youtrack.jetbrains.net/issue/IDEA-49738">IDEA-49738</a>).</p>
<p><em>Grails Target History </em>- Running a Grails target brings up a dialog box. You can now use up and down arrow to scroll through your history (<a href="http://youtrack.jetbrains.net/issue/IDEA-46943">IDEA-46943</a>).</p>
<p><em>Ivy Integration</em> &#8211; IDEA reads your Ivy cache and automatically loads source and javadoc jars if they&#8217;re available (<a href="http://youtrack.jetbrains.net/issue/IDEA-53294">IDEA-53294</a>).</p>
<p><em>UI Improvements</em> &#8211; The &#8220;Browse to http://localhost:8080/xxx&#8221; message in the console now lets you click it to open a browser (<a href="http://youtrack.jetbrains.net/issue/IDEA-47166">IDEA-47166</a>), the test console allows keyboard input in case your tests read from standard input (<a href="http://youtrack.jetbrains.net/issue/IDEA-57035">IDEA-57035</a>), the gutter of controller actions show an icon that lets you jump to the corresponding view (<a href="http://youtrack.jetbrains.net/issue/IDEA-49320">IDEA-49320</a>, and the &#8220;New&#8221; menu now has context sensitive sorting (<a href="http://youtrack.jetbrains.net/issue/IDEA-49086">IDEA-49086</a>). How&#8217;s that for productivity boosting?</p>
<p>I believe that covers it. If you want a free IDEA Ultimate license then there are ways to get them&#8230; speaking at your local Java/Groovy Users Group is usually the easiest, and many JUGs have giveaways if you feel lucky. If your group isn&#8217;t sponsored by JetBrains then you can always ask: email jugs@jetbrains.com!</p>
<p>Happy Holidays everyone. I&#8217;m hoping Santa brings IDEA 10.1.</p>
<script>var dzone_style="2";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><div style="float: left; width: 140px; height: 21px; overflow: hidden; position: relative; left: 8px;"><script>//<![CDATA[
reddit_url="http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/";
//]]&gt;
</script><script language="javascript" src="http://reddit.com/button.js?t=1"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.canoo.com/blog/2010/12/23/idea-x-for-the-grails-developer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

