NetBeans 6.0 Rocks!

Volume 10, Issue 101; 28 Sep 2007; last modified 08 Oct 2010

Not just for the big reasons, but especially for the small ones.

I downloaded the NetBeans6.0 Beta 1” release last week mostly because I thought I'd try out some of its big new features, like support for Ruby. Or, at least, I thought I'd eventually get around to trying them.

What I've discovered in just a few short days however, is how hugely happy and more productive I feel because of three quite small features.

The first, is notification of unused imports.

As a class lives and breathes, and gets refactored, a lot of junk imports can collect at the top. I'll grant that it's hardly the most important bit of cleanup you can do, but I like my code neat and tidy so I appreciate that NetBeans now tells me when an import goes stale.

The second feature is automatic highlighting. Put the cursor on an identifier and NetBeans highlights every use of that identifier. Here the cursor was on “command”:

And finally, the code completion dialog has grown some smarts. It's now context sensitive. In this (contrived) example, I'm in a statement that's assigning a value to a string so NetBeans has put all the methods that return strings at the top of the list.

It's even more clever than that in ways that seem nicely intuitive without my having to think about them. For example, if the method you insert has a single string parameter, and you're near the top of a method that also has a single string parameter, NetBeans suggests that same parameter as the argument to the method you just inserted. I'm not sure what the rules are, and it isn't always right of course, but it often is and then it feels good.

If you do Java coding, you owe yourself a look at NetBeans 6.0.

Oh, and I'm sure when I get around to trying some of its bigger features, I'll be impressed with those too. But the small things rock right now!

(Those are screen shots from my XProc implementation, if that wasn't obvious, but it's a class that I just copied from another and started hacking at, so I wouldn't go looking for meaning in it if I was you. Or even if I wasn't.)

Comments

If you like these things, you should try Eclipse. I saw this post hoping to see what new things NetBeans did that were new and better and found 3 things that I've been using in Eclipse for years!

—Posted by will on 28 Sep 2007 @ 09:39 UTC #

The NetBeans code completion seems smarter than the Eclipse one. For example invoking code completion for: java.util.List<Integer> l = new ^ does not offer all the implementors of the List in Eclipse but in NetBeans 6 does.

—Posted by tom on 29 Sep 2007 @ 07:57 UTC #

The code completion features seem interesting. Unfortunately, these times I'm doing not enough coding to know if they are present in similar programs.

But as far as the imports managing and the identifier highlighting are concerned... Well, instead of showcasing features that other IDEs already had *years* ago, I would find much more interesting to read a rationale for your choice of NetBeans over other competitors (in particular, open source competitors such as Eclipse).

—Posted by Giulio Piancastelli on 29 Sep 2007 @ 11:42 UTC #

Norm, what's your baseline for this comparison? Is it Netbeans 5.5? I'm a confirmed Eclipse user, and I keep seeing other people raving about Netbeans, but each time I try it, there's nothing compelling for me there. It may be that I've been using Eclipse for so long that I can't easily migrate to another IDE, but I managed to use IDEA quite happily in a previous job, so I think it's possible for me to move to something else. Netbeans just hasn't provided a good enough reason for me to move yet and the impedance mismatch in terms of the different ways of thinking about development in that environment has meant that I've not been able to really immerse myself in Netbeans for any length of time.

I sometimes wonder when I see yourself and Tim singing the praises of Netbeans whether you would do the same if you didn't work at Sun? It might be a good idea to have a disclaimer either way?

Tom, are you sure? What version of Eclipse are you using?

—Posted by James Abley on 29 Sep 2007 @ 10:09 UTC #

My baseline was Netbeans 5.5. I chose Netbeans because that's what the rest of my development team uses. I've never tried to do any sort of objective comparison between Netbeans and its competitors.

That said, I don't feel like I need any more explicit a disclaimer here than I make on the homepage. I'm a fan of Netbeans because I use it and like it.

—Posted by Norman Walsh on 02 Oct 2007 @ 04:19 UTC #

I usually recommend to users to each side (Eclipse and NetBeans) to evaluate the other software from time to time. Mostly, I think the differences come down to what you use java for.

NetBeans wins GUI development hands down for its inclusion of Matisse.

Eclipse is usually the favorite for J2EE, and up until I evaluated NetBeans last, it also has better project and task management. This is especially true with the recent Mylyn addition. Also, Eclipse tends to have more 3rd party plugins.

It looks like NetBeans is catching up with some of the nicer features of Eclipse, and I'll have to schedule a re-evaluation of NetBeans. A free (i.e. not MyEclipse) and stable Eclipse+Matisse would be hard to beat, however.

—Posted by Chris on 03 Oct 2007 @ 04:18 UTC #

@Chris

>>A free [..] Eclipse+Matisse would be hard to beat, however.

You mean something like this? (Well, it's not free, but Eclipse+Matisse nonetheless...)

http://www.myeclipseide.com/index.php?module=htmlpages&func=display&pid=5

—Posted by Matt on 09 May 2008 @ 07:12 UTC #