Switching to IDEA, another tale

And since we’re talking about switching stuff, another thing that I recently changed is the IDE I’m using on a day by day basis. I have been a long time Eclipse user, and I still think it is a great IDE, specially for the price (you can’t beat free, can you?). It is stable enough, works on different platforms (although the Linux version has always been less stable than the others, in my opinion) and provides you with a very complete platform to develop enterprise, web, desktop and mobile applications.

But I’ve always heard people talk wonders about IntelliJ IDEA. In fact, if you ask the resident bot at freenode‘s ##java IRC channel about "IDEA FAQ", the response will be "Yes, IDEA can do that.". I had already tried IDEA back when it was at version 5 or 6, and I found it too different to Eclipse at the time, and since I was in the middle of a project in which the whole team used Eclipse, I didn’t had the time or wanted to go into the effort of switching. But now I’m in a different team, and many of my co-workers there use IDEA (some use Eclipse too), so I thought this was the best time to try it out again, since I’d always have people to rely on for questions. That’s always a good idea when trying something new, you know. It’s like learning how to drive, it’s better to have an instructor.

So, after the initial shock I must say I’m pretty impressed with the tool. It is definitely a different experience from Eclipse, in that I think IDEA puts much more emphasis on the editor window. Eclipse seems to be more focused on the perspectives, while IDEA concentrates on having the editors always there. And coding is all about editors, isn’t it?

So far, the best feature I like about IDEA is their inspection profiles. It is basically a set of rules that you can enable/disable and configure so that they provide you with hints about things that you are doing wrong.

For example, I like to surround all my debug() and trace() statements with an if() to check if the log level is enabled. IDEA comes with a "Logging Issues" inspection for "Log statements not guarded by log condition" to mark instances that don’t follow this rule. And not only that, you can configure the "severity" of the issue (do you want it to be marked as a warning or an error? I have it as error). And, if you happen to use a different logging mechanism than java.util.Logging (like we do, since we’re using slf4j), you can configure the Logger class and log conditions that need to be present. And this is only one small issue among the many that are available to IDEA, and there are always plugins that add inspections for other stuff (like javadoc compliance, wicket stuff, etc). This is the feature that so far has sold me on using IDEA (besides the focus on editing). I still have to try doing remote debugging on it, but I hear it works fine.

I think Netbeans has something similar to IDEA’s inspections, but I can only handle one IDE switch per month.

3 thoughts on “Switching to IDEA, another tale

  1. i used IDEA and its nice to hear some opinion about IDEA that is not Mac type of opinion -ask people why they are using mac and you will hear just noice 😉

Leave a Reply to Daan Cancel reply