June 18, 2012 | Category: Coding

The Detail of IntelliJ

Having only really dabbled with it before, I’ve been pleasantly surprised now that I’m using IntelliJ IDEA almost full-time. It’s not that it has a single feature that is mind-blowingly ahead of the competition; it’s all the little details that just make it a pleasure to use.

My first “That’s Really Nice” moment was when working with some Spring beans and it understood all of the links between the code and the config. If I hadn’t added a referenced bean, it would tell me. If I type in a bean’s class attribute, it knows that it maps to a Java class and can auto-complete that for me. If you pull in a property file using Spring’s PropertyPlaceholderConfigurer support, it parses the property file so it can auto-complete placeholder usages, give you a hint as to the current value (so you know you have the correct property), and tells you when you’ve typed in a placeholder it doesn’t yet recognise (usually because you forgot to add it to the property file).

The embedded language fragment support, though, is really something else. If you have a Java class that contains a String with some SQL in it, Eclipse will treat it as a String and that’s that. IntelliJ goes a step further. Sure, it’s a String, but it can understand that it’s SQL (or JPQL, HQL or whatever) and do syntax checking for you. It’ll auto-complete keywords for you. Heck, if you tell the IDE about your data-source (presumably a relational DB in this case), it’ll store a bunch of metadata about that data source, and use that to aid you too; by extending the auto-complete to table names, for example.

There are a bunch of other great features in there but, as I say, it’s not the big, shouty features that make it great. It’s the attention to detail in making coding that much easier that makes it such a pleasant experience to work with. I can’t see myself going back any time soon.