The amazing adventures of Doug Hughes

I’ve been using IntelliJ IDEA almost exclusively for about a month now, so I feel pretty comfortable saying that it walks all over Eclipse in many ways. I thought I would blog a bit about this IDE and offer some reasons that you might download the trial and give it a whirl.

To start with, all of the expected features are here. That includes code insight and completion, version control integration, Maven integration, multi-language support, integrating debugging, snippets, etc. That’s all a given.

Beyond the fact that it has all the key features of any IDE, it has a number of very nice features that make it a highly productive tool. I’ll start with language support.

First off, its Groovy support is light-years beyond what is available in Eclipse. I’ve tried to use Eclipse to do Groovy work, and it is a constant battle. Each new version of the Groovy plugin breaks something else for every thing it fixes. I’m not knocking the guys who write the plugin, since they do it on their own time for free, and they deserve thanks and acknowledgement for their effort. The reality is simply that I had a lot of problems with it, either random hangs, compiling issues (especially joint Java-Groovy compiling), code insight issues (or lack thereof), etc. IDEA’s Groovy support is far and away the standard that all other editors should be striving for.

Next, its Flex and ActionScript support is, in many ways, superior to FlexBuilder 3. FlexBuilder 4 may outdo them in some areas (support for the Flex 4 SDK, the network monitor, etc.), so I may be using both tools when it comes to Flex and AIR development. But even so, IDEA’s Flex features are very good and definitely in the same league as FlexBuilder’s.

Finally, it has a pretty nice CFML plugin too! While it won’t be on the same level as the upcoming ColdFusion IDE from Adobe, its inclusion in the wide range of features in IDEA is a welcome addition.

Of course, I’m only touching on the languages I use the most. The list of supported languages is extremely long. And I should mention that its code formatting options are very detailed, which is great, because I’m somewhat particular about how I like my code to look. intellij_quickcommands

The IDE is also very “intelligent” in the hints and suggestions it offers you when it comes to refactoring or fixing errors. For example, a quick keystroke will bring up a context-sensitive code generation menu like the one on the right. In another few keystrokes, you can implement all the methods in any interfaces, override methods, and more. And since the menu is dependant on what you’re doing, it’s kept short and sweet.

It also has context sensitive “tips” menu, that you can see on the right. Depending on what you’re doing, it will offer a number of relevant commands to test things out or simplify the code that you’re editing. In a similar vein, there is a “quick intellij_hintsfix” menu that looks the same, but has a red light bulb, and shows up when something is wrong. It will suggest importing a missing class, creating a class, renaming the class or package, etc. It’s very handy since you can trigger the menu and then pick a fix in just a second.

As you may have guessed from what I’ve said so far, I’ve been working on some Java and Groovy projects, and this is another area where IDEA offers some very cool extras. While Java offers some of the most powerful tools you’ll find anywhere, the cost is always in configuring things, managing the JAR libraries, and just trying to keep track of what the heck is going on.intellij_web

I’ve become fond of a number of features that IDEA includes to make working with Java and JEE applications much more pleasant. Normally, if you’re building a JEE application, you have a web.xml file that configures numerous core elements. It’s a nasty XML file, and even XML editing and syntax features (which are here, of course), don’t help that much. IDEA has a nice graphical view of the elements of a JEE web application which you can see on the right. Trust me, it’s a lot easier to look through than the XML!

I’ll say this now: anyone who does Java or Groovy web development and doesn’t use Spring is insane. Anyone who has used ColdSpring knows the power of dependency injection. Spring does intellij_springthat, plus just about anything else you can imagine. But whether you use annotations to configure the dependencies, or whether you use an XML configuration file, it can be hard to keep track of what depends on what. This is especially true on large projects. Well, wonder no more. IDEA has some very cool Spring tools, but to me the best one is a dynamically-generated dependency graph. And it works whether you use annotations, XML, or both.intellij_associations

Along the same lines, IDEA’s Hibernate and JPA support are excellent. It offers tools to generate Hibernate configuration files, does code-insight on annotations, and just generally makes it easy to use. But one very nice feature is similar to the Spring one I just mentioned: a graph of the object associations, generated from either annotations or the XML configuration.

To add one more Hibernate-related feature, it comes with an integrated HQL (Hibernate Query Language) editor and datasource browser, to make writing HQL statements very easy. Before, I’d have to write a unit test just to try out a query, whether I needed a test or not. Thankfully, those days are behind me! You can see a screenshot of the HQL editor below:


Now, some of these features are actually available to one degree or another in Eclipse, if you install the right plugins and don’t run into any problems. But that may be one of the major differences between IDEA and Eclipse: the overall cohesion of the tool. Eclipse is open-source and is geared at letting people write things to plug into it. Unfortunately, that means a lot of things can be flaky or poorly implemented. Managing Eclipse plugins and version upgrades can take up waaay more time than it should. Because IDEA is made by a single company, it looks and acts much more, well, solid and integrated. Let me be quick to point out that you can (and many do) write free, open-source plugins for IDEA. There is an entire plugin development community. But in general, things that are very useful are actually rolled into the product itself (with proper attribution of course) and maintained by the company going forward, to ensure a high level of quality.intellij tests

Speaking of quality, let me touch briefly on the testing capabilities within the IDE. Put simply: they rock. Things like JUnit, TestNG, FlexUnit, and others are included by default. And as you can see from the image on the right, you not only get test results, but integrated statistics and code coverage data as well:

The final area I wanted to mention is in the code analysis area. The features built into IDEA in this area are really quite amazing. There are full sets of customizable analysis tools that find errors and problem areas in a large number of categories. Hopefully the screenshot below gives you an idea of the depth of the information that the IDE can give you.

intellij inspection

On top of the analysis advice, it offers some nice extras like this dependency matrix, which gives you concrete information of how coupled your classes are and where any cyclic dependencies may lurk:

intellij dependencies

OK, I’m finished gushing over IDEA. I’m sure you get it by now: I think it’s pretty good. The only flag anyone I’ve talked to about it ever raises is that it isn’t free. Yes, it’s not free. It costs $250 for a single-developer license. Some people balk at that, but I really can’t believe it when they do. $250?! Considering how much this tool does, they could probably charge $2500 and people would still buy it. And as I alluded above, you do sometimes get what you pay for. Eclipse is free, that’s true, but as a result it can also be flaky, incoherent, and hard to manage, especially when you start piling on the plugins.

All that said, you can download a free trial of IDEA to see what the fuss is about, if you like. If your programming duties involve any Java or Groovy work, this will sell itself. The fact that it *also* has good Flex and CFML support, along with all the tools and features I’ve been raving about, made this a no-brainer for me. So, anyone else out there using IDEA? Or, if anyone decides to give it a try based on this blog entry, please let me know what you think!

Comments on: "IntelliJ IDEA Is Now My IDE of Choice. Heres Why." (15)

  1. Joe Rinehart said:

    Ok, I’m sold, just on that spring-hibernate xml view alone. If BAH won’t buy it for me, I’ll get it myself.


  2. Qasim Rasheed said:

    I received a licenced copy couple of weeks ago at work after Brian described the benefits during a converstation. And so far I am sold, although I have not used any of the fancy Hibernate or Spring integration yet.


  3. Matt Darby said:

    Yeah I was going to look into this after Qasim told me about it. Hopefully in the next couple of weeks I can try out the trial version to play with it myself.


  4. William Shields said:

    Yes, IntelliJ is awesome. The Spring integration is fantastic, specifically the code completion when writing Spring config files like typing:

    <property name="

    and being prompted with a list of the object's properties.

    Lots and lots of little things like that make the editor (imho the most important part) second to none.


  5. Peter Bell said:

    I got IntelliJ for the Groovy/Grails support. I now find myself using Textmate for quick hacking (any dynamically typed language), Eclipse for larger CFML projects (even though git support is worse than the textmate bundle), and IntelliJ for my explorations in Grails, Groovy and Java. Not done much with the Java yet, but after reading this posting I’m thinking I should give it a whirl.

    Re: Groovy/Grails support, anyone who is a big Eclipse fan could just wait. At the gr8 conference in Copenhagen a couple of months ago, SpringSource (who acquired g2one – the company that the Groovy and Grails project leads work for) showed off some of their recent work on the Eclipse plugin, and while it’s still behind the curve, they have a commitment to a great Groovy/Grails editing experience in Eclipse so I’m guessing by end of year it’ll suck a lot less.


  6. Thai Dang Vu said:

    I agree with everything you said except “anyone who does Java or Groovy web development and doesn’t use Spring is insane”. Try Seam. It won’t give you a lot of surprise as Idea did, but it’s worth a try, I assume.


  7. Been using IDEA for years, simply best Java IDE out there. Eclipse is a fair piece of software and on paper a worthy competitor but that where it ends.

    In a way you can think about it as Mac OS X vs. Windows – on paper they mostly do the same things but its the intangibles that make a huge difference


  8. Re: Flashbuilder network monitor, you have a couple of options:
    1. Firebug of course
    2. IntelliJ has a nice plugin called tcpmonitor that is very nice; was a port from ApacheAxis tcp monitor I believe. It’s one of my standard IDEA plugins in my toolkit


  9. Mike Heath said:

    I love the features of IDEA. I just hate how slow it is. It often pauses for one or two seconds just editing files. This gets really annoying. It’s not annoying enough for me to go back to Eclipse but I still think about it often.


  10. Brian kotek said:

    Mike, I don’t notice any slowness myself. Have you tried increasing the JVM memory settings?


  11. Jamie Krug said:

    IntelliJ also provides *complete* Linux support as well. Eclipse of course does as well, but Flex/Flash Builder does not 😦


  12. Hi Mike,

    I’ve been an IDEA user since 4.0.x and I agree…IDEA is getting slower than what it used to be. Def annoys me sometimes too but not enough to go back to Eclipse πŸ™‚ To be honest, depending on what I’m doing, sometimes I will build two set of IDEA projects on the same sourcecode; one for latest IDEA(8.1.3) and one for 5.1.2. 8.1.3 has some nice features but when I’m into the thick of something and just straight coding…I go to 5.1.2…it just flies.

    The PC 8.1.3 pauses on is a HP XW6400 quad core w/ 4gb ram + XP pro


  13. Dan Howard said:

    You forgot the best of all. Easy keyboard navigation and finding with ctrl-N and ctrl-shift-N


  14. Yeah, I love intellij, but every version from 6 on has been getting slower.

    I uninstall all pre-installed plugins I don’t use.

    The spring integration can become so slow it’s unusable on really large projects.

    Small code bases it still flies, but once a project becomes moderately large it starts to struggle.


  15. I’ve been hanging by the fingernails onto Flex Builder 3 for linux. Now that Flex 4 is out and after reading your post I don’t think I can hang on any longer. I really like the look of the Spring / Hibernate support too .. It’s time to get busy and learn a new IDE. πŸ™‚


Comments are closed.

Tag Cloud

%d bloggers like this: