Scala + IDE (looking for the holy grail)

March 16, 2011

This post is going to touch one of the most religious topics in coding: the IDE.

It doesn’t matter if it’s Eclipse vs Netbeans or Idea vs all of them, a developer loves and defends his IDE (most of them).

For a long time I have been a true follower of the Eclipse way of things. I loved its extensibility and the amount of available plugins. I really liked doing RCP projects and to work with Eclipse.

But since I started working with Scala I also wanted to take a look at the different IDEs out there.

I gave them all a little rundown. These are the results.

What I wanted to do

I already did some stuff with Scala and SBT and decided to start a small pet project.

Nothing too fancy. Some jMonkeyEngine flavor, playing with actors and reimplementing some algorithms.

After some playing around with jEdit, Git and SBT I started playing with the big three Java-IDEs.

Chapter 1: Eclipse

Naturally I started out using Eclipse.

Sure, I already knew the m2eclipse plugin was crap.

Crap like in

I can’t believe I got caught in the endless cycle of recompile again.

Dammit, it compiles on the cmdl but gives error warnings in the IDE?

Why, what, … ahhhhh it crashed again

I could continue for hours ranting about this abomination but it’s not the topic of this post. In the end I ended up uninstalling it and using the maven eclipse plugin like everybody else.

The next thing I tried was Eclipses Git support. The plugin looks very solid and didn’t give me any problems.

Finally I got to Eclipses Scala support. Eclipse features set of plugins (http://www.scala-ide.org/) to integrate Scala.

Sadly the state of these plugins is rather discouraging. Right now Eclipse (3.6 Helios in my case) will frequently hang while working on Scala files. Autocomplete looks more like guesswork and often misses some entries. Several times my whole Eclipse crashed while either refreshing a file I just had edited or trying to autocomplete.

Ah, and not to forget about the popup warnings.

A message to developers: If there is a problem that doesn’t crash your app or causes your project to spontaneously go up in flames don’t show a popup warning and make me click on a button. This makes the whole thing completely unusable for an impatient person like me.

Sadly, there is no other option for Eclipse. Right now I’d consider this thing an absolute no go.

The good news is that the Martin Odersky (creator of Scala) just joined the eclipse scala-ide which will hopefully lead to a way better IDE.

Chapter 2: Netbeans

Some history about my relationship to Netbeans.

I started out doing java in vi, then I switched to JBuilder. For a brief time I used Netbeans. I hated it.

It was horrendous experience. It was slow, a memory hog and slow. Did I mention it was slow.

So, after battling a full week against my mixed feelings towards Netbeans I downloaded and installed it (for this I tried both, 6.9 and 7.0 Beta 2).

…

I loved it. Netbeans allowed me to use the same shortcuts as Eclipse (relearning shortcuts is something I really wanted to avoid). The interface is clean and feels snappy. It comes with maven integration out of the box. And the maven support actually works.

So, things looked good on that front.

Next thing I tried was git support. From my limited testing I would say things look pretty solid. No crashes, no problems. But again: I just did very basic things there.

Note: Right now Oracle is developing an official plugin for Git.

And finally I tested the scala support.

Sadly Netbeans Scala support is as bas as Eclipses.

It crashes, it hangs, it doesn’t do auto complete most of the time and things sometimes get outright weird.

And again a message to developers: If there is a problem that doesn’t crash your app or causes your project to spontaneously go up in flames don’t show a popup warning and make me click on a button. This makes the whole thing completely unusable for an impatient person like me.

Chapter 3: IntelliJ IDEA

I haven’t payed for a Java IDE since JBuilder and I want to keep it that way. Luckily IntelliJ decided to change the way they do things and since IDEA 9 there is a free version. I got IDEA 10, the most current version as of this writing.

IDEA comes with maven support out of the box, just like Netbeans. Things simply work and I don’t have to perform black magic when importing a project, a big plus compared to Eclipse.

Git also worked without any problems.

Now for the scary part: Scala support.

It works.

Yes, autocompletion needs some work as sometimes not all options show up but it doesn’t crash and doesn’t force me to click on a damn pop-ups everytime something goes wrong.

It even comes with SBT support and decent syntax highlighting. There is still some work needed but it does a lot of the things I wanted and all I needed.

Wrapping up

Eclipse:

Git support is the only thing out of my list of requirements that did its job.

Maven support is utterly broken and the Scala IDE causes way more pain than is justifiable.

Netbeans:

Great Maven integration, Git worked without any problems. Scala support is broken.

I still really like the IDE and I am hoping to get back to it at some point.

IntelliJ Idea:

The clear winner.

Flawless Maven support. Working Git integration. A Scala plugin that solves more problems than it causes.

That’s it for now.

I am going to revisit the whole thing in a few months.