Saturday, September 02, 2006

From Eclipse to NetBeans: Part 3

I got a lot of good tips from NetBeans developers and users about how to resolve some of the issues I ran into. A number of them, as I mostly expected, were related to my running a beta that's still under development. Others are resolved via modules and add-ins (that in many cases should perhaps be included as standard). And still other cases are resolved or scheduled to be resolved in NetBeans 6. So to be fair, I decided to continue my NetBeans adventure by diving to the bleeding edge of NetBeans: building directly from source and running JDK 1.6 Beta 2.

I won't go into the details, but getting NetBeans to build was an extremely simple matter (thanks to Tor Norbye from Sun). Set CVSROOT, checkout -P standard, cd nbbuild, ant. It's really that simple. I did need to up the maximum memory needed for ant, but that was a minor issue. After the build, I found "ant tryme" that starts up NetBeans, and I was off and running.

This article will be a short wrap-up of issues from Part 1, revisited based on tips, tricks, and NetBeans 6 current and planned features. Hopefully it will demonstrate to potential switchers that NetBeans has really turned a corner. I'll revisit Part 2 in the next article.

I used to be among the NetBeans detractors...and for good reason; NetBeans had a rocky start. But I'm rapidly growing fond of it, especially using NetBeans 6.


I'll take the items from Part 1 point-by-point. There's some useful links inline as well, so feel free to skim this list for issues of particular interest to you.

  1. Antialiasing - RESOLVED! When running under JDK 1.6, all text elements are immediately antialiased according to the host platform's settings. No additional configuration changes are needed.
  2. SVN by default - RESOLVED, I think. My basic pull of NetBeans 6 from CVS included SVN support immediately. I believe it's intended to be in the full release by default as well.
  3. Workspaces - OPEN. My main use for workspaces is to keep different sets of projects in different places, and to a lesser extent to have different configurations for those sets. No obvious support for this in NetBeans 6 yet.
  4. Separate repository view - OPEN. Eclipse's repository view is a godsend when you're hunting around for projects, tags, and branches, or if you want to do any remote repository management. I still miss it, and there's no out-of-the-box support in NB 6 for a repository view.
  5. Standard SVN layout support - OPEN. I would like NetBeans to understand what "trunk", "tags", and "branches" dirs in SVN are used for.
  6. Delete project not deleting files - OPEN. I tried to delete a working copy locally and the files remained on disk.
  7. Wizarditis - OPEN. The best example of this is perhaps the SCM wizard, where at least seven clicks are required for me to check out my JRuby branch. If I had a repository view, it might take three or four.
  8. Show non-project files in project view - OPEN, but not a big deal. I've gotten accustomed to just using the Files view when I need access to non-Java source. I still think it's necessary to show other files in the project view, but it hasn't gotten in my way as much as I thought it might.
  9. Settings dialog search - OPEN, but improving. I remember once being told that if people need to use a site map or search for your site, you're doing something wrong. NetBeans should actually be applauded for presenting common settings in a novice dialog and a full complement of expert settings a button-press away. In NB6, they appear to be moving some of the important advanced settings to the main dialog as well. It's a balancing act, but I think a lot of people will appreciate the easy dialog.
  10. Browser selection - Doubly RESOLVED. With JDK 1.6, NB6 uses your platform's browser by default, and the setting has been moved to the basic settings dialog.
  11. NetBeans is a goofy name - UNRESOLVABLE. There's too much branding and history behind the NetBeans name to change it, or so I'm told. Oh well, at least it's not limiting in any way, and it does have a nice mouthfeel to it unlike "Visual Studio 2005".
  12. Eclipse keybindings - OPEN, but workable. The default Eclipse keybindings are missing some important ones, but you can go map them yourself easily enough. Unfortunately there's no equivalent to Ctrl-Shift-R, which is like a "super open" for any file in the workspace. I also haven't found an outline view shortcut like Ctrl-O, which hurts a bit.
  13. Sorted members view - OPEN. However I can deal with the default sorting for now.
  14. Show packages as a hierarchy - OPEN, but I've been using the Files view almost exclusively which already uses a hierarchy.
  15. Anti-aliased UI - RESOLVED! Under JDK 1.6, UI elements are also antialiased! It looks great!
  16. Collapsing comments - RESOLVED, but one bug. It turns out that only the large license block at the top of our JRuby source files refuses to collapse. Everything else, including JavaDocs and multi-line comments, collapses ok. Probably a bug in how NB determines what comments to collapse.
  17. Improved coloration - RESOLVED SOON. Better coloration and other editor improvements are planned for NB6.
  18. Memory usage - OPEN, but improved. NetBeans 6 is a little better, but still typically takes over 200MB and sometimes over 300MB of memory. Eclipse usually stays under 200MB for me. However I don't have any modules disabled, and NB6 comes with UI design, Java EE, DB support, XML support, Web design support and a ton of other stuff out-of-the-box. That balances things out a lot.
  19. FIXME support - RESOLVED via external module. The NetBeans Tasklist looks quite a bit more sophisticated than Eclipse's support.
  20. Clear search results - OPEN, but workable. Search for nothing and the results clear. However I conversed with Roman Strobl, NetBeans Evangelist, and he agreed that was a little cumbersome.
  21. Right-click editor menu with SCM operations - RESOLVED. You can't get those options right-clicking in the editor, but you can right-click the editor tab for the same effect. Hooray!
  22. Odd behavior of SVN menus in file view - RESOLVED. This and several other SVN issues I ran into appear to have been fixed in recent 5.5 and 6.0 development builds. Subversion support seems to be tighter in NB6, or so it seems.
  23. Slow start-up - OPEN, but fading fast. It's not a large perceptible difference between Eclipse and NetBeans now, and NetBeans is loading a lot more stuff. It's very nearly RESOLVED.
Hopefully it's apparent that NetBeans is arriving fast. If I were to make predictions, I'd say that NetBeans 5.5 will be a really powerful and useful release, especially considering suport for Java SE 5 and Java EE 5 out-of-the-box. I believe the bugs I've encountered will be wrapped up, and 5.5 will be a compelling alternative to "Eclipse-plus-ten-thousand-plugins", which functionality it easily matches.

I would also predict that NB6 may finally be the big release that surpasses Eclipse for day-one usability and functionality. There's just so much packed into the base product, I don't think Eclipse itself is even a fair comparison. WSAD may be the only real competitor at that point, and I'd prefer not to run that monster (and I also prefer not to use WebSphere.)

One area I think NetBeans needs to improve is in making development releases easily available. I have to dig down through multiple pages, dropdowns and license-acceptance forms to get at the 5.5 and 6.0 dev releases, which have so far been very stable and very nice. To save some time, here's a link to the NetBeans Download form. "Daily" builds are obvious enough, but I believe "Q-Build" builds are probably "QA" builds, perhaps equivalent to Eclipse's "integration builds" or "milestones". Q-Builds might be a good place to get started for you Pro users out there.


Anonymous said...

Hi Charles, interesting to see how your move to Netbeans is going. I use Netbeans for my Java projects, but now that I'm getting started with Ruby I downloaded RadRails only to immediately get bitten by the old Eclipse bug where files viewed in the IDE is different from the files on the drive. No amount of refreshing, CVS updating, project closing/reopening can get it to understand that it should reload them.

I guess Ola would recommend me to use Emacs instead, but I would prefer to see a nice Netbeans plugin for Ruby.


(The John Lithgow guy from the Java One dinner.

Matt said...

Any solution on Ctrl+Shift+R (or Ctrl+Shift+N in IDEA)? This is a real show stopper for me as I'm addicted to these key bindings. ;-)

Anonymous said...

This is a really interesting read. I've tried Eclipse and NetBeans and I have to say that while I'm undecided in that Eclipse is a nice CVS browser and general purpose editor and NetBeans seems geared for J2EE development from my experience. It looks like theres big changes and Eclipse is gaining visual IDE features and Netbeans is gaining general purpose features.

Hopefully one will turn out to be the IDE I'm looking for.

Viggo said...

thanks for the comparison to Eclipse. Have you created issues for all of your unresolved eclipse-to-netbeans features?