It is only logical that many Java developers have started to look around to see if there's anything better out there. And guess what? There is. It's called IntelliJ IDEA (henceforth called “IntelliJ”) and it's a free and open source IDE from a company called Jetbrains. But you probably knew that already.
As it turned out, I was the lucky winner of a IntelliJ Ultimate Edition license at the Jetbrains booth at Øredev developer conference in 2012 (the Community Edition is completely free though). At that time I still used Eclipse; I had tried IntelliJ a few times, but I wasn't convinced. I mean, it was fast and beautiful and all that, but it just felt strange and backwards to me. It was simply not for me, I thought.
Fast forward a few months. I had quit working for a consultant company that couldn’t give me exciting enough projects to work on, and started working at a company developing a backup service for the cloud, developing in a much more modern environment. I kept on using Eclipse at first, but got increasingly frustrated with the weak Maven support (hint: it's unusable).
IntelliJ, on the other hand, had great Maven support, and that’s why I decided to force myself to use it for 30 days to see if it would stick. It turned out, I did not need to force myself, after just a few days I was falling in love.
What’s so great about IntelliJ then?
It’s fast, really fast. Since it’s not compiling all the time, like Eclipse does, it has a lot more resources to spend on the UI. And yes, it will still show warnings and errors as you type.
It’s beautiful. Well, the standard theme is no better than Eclipse's, but the new dark theme called Darcula is gorgeous (looks a little like sublime text).
No more saving. Files are saved automatically, no more ctrl+s’ing or cmd+s’ing. That of course means that you need to press something else if you want IntelliJ to compile (e.g. for hot-swapping), and that keystroke is cmd+F9 (and probably ctrl+F9 on Linux/Windows). It turns out you don't need to compile every time you save. Who knew!
Easy variable inspection. At first I was annoyed that inspecting variables during debug was a little more complicated in IntelliJ than selecting and pressing cmd+shift+i in Eclipse. But then I accidentally discovered that all you need to do is Alt-click on the variable that you want to inspect. Awesome!
Cmd+Alt+click opens the implementation of an interface or an interface method (or brings up a list if there are more than one).
Alt+Enter helps you almost always! It can quickly insert code to:
- Iterate over a collection
- Add missing imports
- Introduce a new variable from a method call
- Much, much more...
Easily generate constructors, getters, setters etc., just by pressing Ctrl+Enter (not Cmd!).
Lots of plugins which are very easy to install, no more update sites - all in one place. Eclipse has always been a little clunky when it comes to plugin management.
Great Maven support (adds and removes modules automatically etc). I no longer have synchronization issues between the terminal and Eclipse. No more F5, baby!
Warns if public methods are unused. Eclipse only does private.
Console scroll lock works. Scroll locking in the Eclipse Console almost works, which means it's unusable. When the lock is on, there's still scrolling, just not as much. In IntelliJ you just click in the console where you want it locked - and it actually works!
Visible changes - IntelliJ shows a green bar in the gutter where changes have been made to a source file - it's easy to undo right in the editor, would otherwise be done with git (or similar).
As with any IDE, you need to do a little tweaking to get it just right, but that’s expected. The first thing to do is obviously to change to the Darcula theme. The settings window is completely searchable, so it’s very easy to find what you’re looking for. If you still struggle, turn to Google. If you still can't make it work, file a feature request in the bug tracker. Jetbrains people are very helpful and responds quickly.
These are some of the things I love about IntelliJ. What are your reasons for using it? Or even more interesting, what are your reasons for not using it?
(You can imagine how thrilled I am over Google basing their new Android Studio IDE off of IntelliJ!)