Categorized | News

Taming Netbeans

Posted on 25 February 2009 by Demian Turner

I’m really glad to see so many posts by PHP devs switching over to Netbeans – I don’t think there’s any real competition when it comes to a PHP IDE with a decent feature set that’s not painful to use.  Obviously this last requirement rules out anything based on Eclipse.

But there are a few niggling hitches remaining in Netbeans that need to be addressed.  Others have written about this already but I’ll paraphrase:

  1. fix the double-click drag select bug
  2. get a more native-looking Mac look and feel
  3. get some themes at least as good as Textmate, eg the default ‘blackboard’ theme

The first problem is in fact very painful and I haven’t been able to find any remedies for it.  Netbeans being a Java app, the GUI is implemented in Swing, which by default doesn’t seem to support the ability to double-click a string of text, then with the mouse button still depressed, drag to select additional words of text.

In any browser, for example, this works as expected: you can click the mouse in the middle of a word, double click to get the whole word, then drag left or right to get the string of words you need.  Not having this feature can be extremely painful because the alternative means you must place, with pixel precision, the cursor at exactly the beginning and end of a word, then click, then drag.

The former system lets you work a lot faster, and in a text selecting business like programming can really cut down on the agro in a day’s work.

If this problem drives anyone else crazy, or someone knows a workaround I’d love to hear about it.

For the second point the Netbeans 6.7 M2 release, out today, seems to address some of the issues.  But it has to be said the IDE is still on the ugly side of things, however slightly less bubbly now which I think is an improvement.

For the third point I dug up a theme this afternoon which is a definite improvement over the sparse selection of themes offered with the Netbeans download.  Check out Ruby Dark Pastels – Mac users beware that the .nbm file gets .jar appended to it when you download the component which makes it unusable.  Simply remove the .jar in the Finder.

The theme is not perfect however, method names are black on a dark blue background, and many code elements (constants, static methods, etc) are white and get match-highlighted in yellow making them unreadable.  Many of these elements are not configurable in the Fonts & Colours preference option.

Bookmark and Share

24 Comments For This Post

  1. David Keen Says:

    Demian, I’m with you on the NetBeans love but until today I don’t think I have ever selected text by doing the double-click, drag thing. I’ll have to try to remeber that.

    I guess you know about the NetBeans for PHP blog? http://blogs.sun.com/netbeansphp/

  2. Demian Turner Says:

    Hey Dave – I don’t think I’ve seen netbeansphp nice one, thanks. Re: clicking, it’s a Mac thing, I think I only discovered it last year. The problem is once you start selecting like that it’s super painful to do it any other way, like watching users double click on browser links 😉

  3. Philip Hofstetter Says:

    The real killer for me is the lack of any setting to specify the line ending style and to remove trailing whitespace on saves.

    An editor without these features is completely useless these days. Sorry.

  4. Loren Lang Says:

    I must be the odd man out. I was using it up until a couple days ago but had to kill it on my Linux dev box. I actually tried to use the SVN plugin and the whole thing became so slow as to be totally unusable. Thoroughly unresponsive for minutes on end. Went back to Eclipse where I haven’t seen that issue. Still not totally convince that it beats vim with my PHP customizations but I’m giving it a fair shot.

    I am still using NetBeans on my Macbook where I don’t use SVN and I really like it there.

    Also, you may also like the Aloha theme (http://blog.huikau.com/2008/04/28/aloha-color-theme-for-netbeans-61/) which, although not specifically geared for PHP can be made to behave quite nicely with a few color tweaks – like changing the php tags to something other than black. :-)

  5. Bill Karwin Says:

    Wow – those hiccups you mentioned are really cosmetic and minor. NetBeans is pretty nice, I agree.

    And honestly, are those minor UI features so crucial? If the speed at which you can highlight text is your bottleneck for PHP development productivity, don’t you think you’re doing something wrong?

  6. David Says:

    Never knew about the double-click word select. That’s cool, but I generally use the keyboard for text selection (which drives me insane on the mac, because I no longer know what button does what..)
    Things that bug me the most:

    Not having full control over file extensions. I have to drop into Nautilus or command line to rename my files. (I think this is being addressed in 6.7)

    svn feature set is nowhere near that of Subversive for Eclipse.

    No bzr support. (been sorely tempted to develop this myself, but not a java programmer, so have to learn that first)

    No code completion for class constructors (fixed in 6.7)

    Content assist for function parameters doesn’t work when the cursor is within the parenthesis. I keep having to move the cursor back over the function name, and then hit ctrl-shift-space to bring it back up again. (Maybe I’m just doing something wrong?)

  7. Geoff Ford Says:

    RE the double click and drag. I did not know about this either. However a workaround is to double click then shift click to extend the selection on windows. Might be Cmd click on Mac.

  8. Brian B. Says:

    I love the new Netbeans too, I used the old one before but recently started using Aptana PHP as a plugin for Eclipse. The one thing that holds me back is not having integration with bug tracking. I use the Mantis plugin for Mylnn to keep track of bugs/tasks within the IDE which has been great.

    Though I know there is a new plugin for NB called CubeOn(http://code.google.com/p/cubeon/) which has Jira and Trac integration with possibility of Mantis down the line.

  9. Demian Turner Says:

    @Bill – they might seem minor but when you spend hours per day you need an environment that’s comfortable. Actually I’ve read comments about the Swing double-click select bug that were a lot more vehement than mine 😉 And it’s a bedding in process, I think there’s something between developers and their IDEs where things have to be “perfect”.

  10. Demian Turner Says:

    @Geoff – thanks for the suggestion – yeah this helps a little but the main thing would be to try and achieve a native (in my case OS X) look & feel within NB, and so far the Swing GUI brings with it some friction.

  11. Demian Turner Says:

    @Brian – CubeOn looks interesting, thanks for the mention.

  12. Rob Wilkerson Says:

    I’ve been wanted to try Netbeans again, but I move between Mac (home) and Linux (work). My one requirement is that my editor/IDE be able to support both so I only have to learn one set of shortcuts, etc.

    Technically, Netbeans supports both, but it’s a disaster in Linux (Ubuntu) with Compiz enabled. Until that gets fixed, I’ll be sticking with Komodo Edit. It’s got a pretty nice mix of editor and IDE upsides without the heft and unused features of an IDE.

  13. Kaspar Says:

    I gave Netbeans a try some weeks ago and was stunned at the first moment. But then came the downsides one after another. The biggest one was the way tasks are handled and that I do not have the possibility to weighten Tasks. So a FIXME tag for example is much more important than a NOTE tag.

    Together with the fact that I could not rely on the results of the search I had to switch back to eclipse. Hopefully one day the issues are fixed.

  14. alex Says:

    The double click and drag (word select) feature is one of the features I miss most from Visual Studio. It seems like it would work if the selection was activated on the mouse down as opposed to the mouse up event.

  15. Dave Says:

    I am trying Netbeans out after having used Eclipse for some time now. I do like a lot of it, but the double-click first word thing is pretty frustrating when you are used to it!

  16. Demian Turner Says:

    @dave, I couldn’t agree more, lack of double-click to select words in any java-buit GUIs is unbearable. I’ve since moved back to ZDE 5.5 as it seems the least buggy PHP editor (recently Zend has totally gone downhill) but no proper word selection in this version :-(

  17. Clay Says:

    @demian,

    I’m always on the lookout for a better PHP IDE, as I posted to the Seagull group re: IDEs & Flexy the other day.

    However, for the past few years I’ve been using Komodo IDE. It’s not as mac-like as, say, Xcode, but I definitely prefer the interface over Netbeans or Eclipse-based IDEs.

    And, it does support double-click and drag to select, just checked. As for colors, I use a customized version of their default Dark theme.

    I’ve had a bit of trouble with getting debugging working consistently, but I may have misconfigured something.

  18. Demian Turner Says:

    @Clay – thanks for the feedback, I gave Komodo an earnest tryout, installed it a few times over the last few years, but main prob was I found debugging to be at least as bad as eclipse, if not worse, and UI kind of slow. When someone finally makes a decent IDE for PHP I think they’ll have a lot of relieved adherents 😉

  19. Clay Says:

    Agreed – every single PHP IDE I’ve tried is missing one thing or another to make it complete.

    The UI responsiveness has improved quite a bit, but even still, every few months I install or update to the latest versions of all the major IDEs to see where things stand, and usually I end up keeping things the same.

  20. alex p. Says:

    Hello,

    Netbeans is definitely my favorite editor for php. I am also an asp.net developer and I am very accustomed to the double click and drag to select text feature.

    It is not so much a development bottleneck, but a productivity bottle neck. If select text in a string it is much faster and less tedious to double click on the first word in your range and highlight by word to the last word in the desired range than it is to have to aim the mouse from one caret position to the other.

  21. Matt Connolly Says:

    Double click and drag is a major pain for me. Still a problem in Netbeans 6.9.

  22. David Says:

    Its fixed in 7.0 but Java based GUI is still a pig lol …

  23. Kenson Goo Says:

    The theme color could be changed easily. Google for “Netbeans theme” and you could download many “blackboard” like themes.

  24. Gaming Says:

    Highly energetic post, Iliked that bit. Will there be a part 2?

Leave a Reply

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Facebook