GWT+ IntelliJ Productivity Tip

If you are an IntelliJ user doing GWT development and you haven't already done so, make use of the boring yet incredibly useful Alt n 8 plug in.  It's either available via the link, or just look for it in the plug-ins panel within IntelliJ.

I can't say enough about this particular plug in, and I'm surprised (based on the paltry number of downloads) more people don't make use of it.  It's a very underrated plug-in for IntelliJ for a couple reasons, but first let's go through an example of how I find it useful for GWT development.  Combined with other keyboard shortcuts, it turns out to save quite a bit of time when performing the following code traversal (starting at a test case for a service implementation class):

  1. (alt-8) -> Jump from Test to Service Implementation
  2. (ctrl-u) -> Jump from Service Implementation to Service Interface
  3. (alt-8) -> Jump from Service Interface to Async Interface
  4. (alt-7) -> find usages of...

That's four keystrokes to move from server-side test case to finding usages of the service on the client-side.  Alt n 8 allows you to use regular expressions to switch between any two files based on naming conventions.  There are only four such rules I need to make this happen (rules below are applied in order so that the first match wins):

Altn8

I suppose if you were so inclined, you could even shorten the example above into two keystrokes (moving from (.*?)ServiceImplTest.java -> $1ServiceAsync.java.. but I find the shortcuts above useful enough as is.

Maybe these shortcuts only save me seconds or a minute of typing per day, but I find the difference to be substantial when it comes to following a train of thought from looking at a test case for server side implementation classes to finding client code that exercises the same code.  No need to type in class names, navigate menus etc.

The usefulness here to test-driven development should be obvious as well.  Quickly switch between writing a test & implementing the functionality. Good stuff all around.

Related posts:

  1. IDE Watch – GWT Plugin for IntelliJ
  2. IntelliJ IDEA and Ruby on Rails
  3. IntelliJ 7.0.2 (it’s the little things)
  4. GWTTestCase and Server Side Mocking
  5. GWT Showcase – BRMS for JBoss Rules

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com