Wednesday, July 29, 2009

IntelliJ IDEA 8 - The Good Parts

I keep getting asked if the upgrade from IDEA 7 to IDEA 8 is worth the cost.

While all the new features are listed on the IDEA site, these are my favorite 5 features of IDEA 8, listed in the order I like 'em best.

Database Support
The new SQL Console means you now get code completion, syntax highlighting, and error highlighting in your SQL scripts. Plus, no more launching a 2nd application to run queries. Very useful, but does seem to work better in MySQL than MS-SQL.

7 new Java Refactorings
The most useful of the new rafactorings are Extract Method Object, which allows you to extract method on blocks with more than one result type, and "Introduce Parameter Object" to compact long parameter lists. Use with care, you may not end up with a meaningless abstraction in your object model. Also, Introduce Constant got a big upgrade that lets you extract just parts of big static strings. Nice!

UML Diagrams
You can create diagrams right in the IDE now. I think there were some plugins in the past that allowed this, but now a nice version of the feature is available in IDEA. You can generate diagrams, and can also create new entities, refactor, and navigate directly to source code. The diagrams look great; I've used them in some presentation already.

Groovy & Grails Support
Improved Groovy support adds a couple notable improvements: better code completion, more inspections, two new refactorings including "Convert method parameter to map-parameter entry", debugger support for Gant(!), and a whole bunch of Grails stuff.

Debugger for Flex (and Javascript)
We're using FlexBuilder for official Flex development at work, but for me, who does mostly Java, I've found it useful to use the IDEA Flex debugger when I don't feel like launching a 2nd huge application on my workstation. We evaluated IDEA 8 as a replacement for FlexBuilder and decided not to, but we'll take another look at IDEA 9 Flex support and maybe switch then. There's also a Javascript debugger but I haven't touched that language in a year or so.

Honorable Mentions

Dataflow to This - Shows you how a certain variable got the value it did. Think of it as a better call stack window.

Thread Dump Analyzer - The new window is way easier on the eyes than scanning through text thread dumps. Nice.

Spring 2.5 support - Use it every day so that some of the new Spring annotations are recognizable and navigable.

IDE Settings Synchronization - Share all your IDE settings between several workstations.

Those are the things I use the most... there is, of course, way more new than that. If you know me and want a 60 day trial license (normally they are only 30) then drop me an email!

Or check out the IDEA 9 EAP.

4 comments:

Bill said...

I love my Intellij IDEA 8, but it does not love me. On a regular basis it throws an error on start up: org.picocontainer.defaults.PicoInvocationTargetInitializationException: InvocationTargetException: java.io.IOException Access is denied. This is on Windows XP. A number of solutions have been suggested by others, though none work consistently. I've even gone as far as uninstalling and deleting all remnants on the file system left behind and re-installing with the latest EAP, all to no avail. Unfortunately, JetBrains is aware of this, aware that it began with version 8, and seem to have decided that there is nothing they can do about it. They closed the problem report as resolved, but with no solution. See http://www.jetbrains.net/jira/browse/IDEA-20950. See also http://www.jetbrains.net/devnet/thread/281566. Obviously, since this started occurring with version 8, it is a coding issue, not something inherently wrong with the environment. As is, it is unusable (I can't boot it up!). So, I am back using NetBeans and Eclipse. I am wondering if the problem will continue in version 9. I feel it is weak for JetBrains to leave this open and am disinclined to renew my license.

Bill

Hamlet D'Arcy said...

@misterJones That sucks, and it does happen to me too but not nearly as frequently as you say. I fix this by shutting down IDEA, deleting my caches, and restarting. My caches are located in C:\Documents and Settings\[username]\.IntelliJIdea8x\system\caches

I'm using the 9 Milestone at home and this never happens.

Michael said...

The Type Migration refactor is one of my favorite 8.x changes. I don't use it everyday but when I need it it does tend to save a lot of time.

Unknown said...

@misterJones: I've just checked with the IntelliJ IDEA team, and it was said that the latest available version - 8.1.3 - has this problem fixed. Have you tried it?