Ruby Screenshot of the Week #28: Unit Testing, and Color Themes

NetBeans 6.1 has been out for a while, so we're working full steam ahead on NetBeans 6.5. There are a number of new features in the trunk, and I'll show a couple of them in this post. First of all though - if you have found ERB or RHTML file editing slow in NetBeans 6.1, please try NetBeans 6.5. There was a performance bug where if you have a lot of JavaScript files in your public/javascript folder, RHTML editing gets really slow. A fix for this will be released, but it didn't make it into Patch 1 so it will be addressed in patch 2. But the daily builds of NetBeans 6.5 has the fix, so if this bug is affecting you, please try the dailies instead. And as a side benefit, you'll be able to access the following features:

New Unit Test Runner!

Erno Mononen has written a new Test Runner UI. In 6.1, unit tests were just run and the normal output shown in the Output Window with some hyperlinks. In the new dedicated test runner, you get something similar to the JUnit window we've had for a file for Java. (Click on image for full size)

Be sure to run your test classes as tests (e.g. use Ctrl/Command F6 rather than Shift F6) such that the IDE will run your classes under the testing GUI. This works not just for Test::Unit but for RSpec as well. You can get more details about this in Erno's blog entry, and if you run into issues, please let us know.

The Aloha Color Theme

Mike McKinney has created a really nice dark color theme for NetBeans, called Aloha. I've taken his theme and have integrated it into our "Extra Color Themes" plugin which is available from the Daily Update Center (and soon, the Stable Update Center). To install it, get the plugin, and then go to the Options dialog and choose Aloha under the Fonts & Colors category. You can see more screenshots of Mike's theme in his blog entry. In previous releases we had some problems with CSS and JavaScript colors not being customizeable, but that is not a problem as of NetBeans 6.1 so hopefully all the file types look great. We still need to make the version control diffbar and the debugger breakpoint and current pc lines respect the current theme; hopefully we'll get to that in NetBeans 6.5.

By the way, you may notice that you only see the editor here. When you press Shift-Escape, the current window with focus gets maximized. I do that while editing a lot. You can press Shift-Escape to toggle it back - and you can also temporarily open the other windows (which you can see slide to the edges) by just hovering the mouse over them.

Finally, one minor feature which can come in handy in NetBeans 6.5 is that "Mark Occurrences" now has a keyboard shortcut for navigating between the references. Thus, if you put your caret on some symbol, you've probably noticed that it gets highlighted - along with other occurrences of that symbol in the same file. You can now use Control-Up and Control-Down to jump between these references. Pretty handy.

Oh, and one more thing - JRuby 1.1.2 was released a few days ago and NetBeans now bundled it - along with RSpec 1.1.4.


Hi Tod, sorry for bugging you personally, but is there any chance you could look at this serious bug in the NB Ruby YAML editor:

Thank you in advance, Jacek

Posted by Jacek on May 29, 2008 at 09:48 PM PDT #

Did you check the YUI RTE problem of not completing itself in the editor in NB ...I posted a comment into your previous blog..

Posted by chinna on May 30, 2008 at 01:36 PM PDT #

Hi Chinna,
yes, I saw you posted both in my blog, and on the YUI blog, as well as posted to the ruby users mail alias. I responded to you there:

Posted by Tor Norbye on May 31, 2008 at 03:46 AM PDT #

Hi Jacek,
sorry, I didn't write the YAML editor; it's written on top of a different editing infrastructure than the one I've been working on. But I'll see what I can do to get the responsible engineer to look at it.

Posted by Tor Norbye on May 31, 2008 at 04:55 AM PDT #

Looks great. I'm currently on the latest nightly build that I could find ( Is this the same as what you refer to as the 6.5 truck above, or have I got the wrong download location?

Keep up the good work. I've been using your Ruby NetBeans IDE for a good while now and found it to be absolutely excellent.

Posted by Stu on June 01, 2008 at 11:16 PM PDT #

Thank you for the update on the YAML editor, Tor. Much appreciated.

Posted by Jacek on June 02, 2008 at 10:39 PM PDT #

Suggestion for weblog entries:
a) Ruby with Matisse
b) Woodstock with Ruby

Posted by guest on June 03, 2008 at 11:01 AM PDT #

Good day, Tor!
There is still some problems with HAML colors not being customizeable. Thanks!

Posted by ruby.freeman on June 04, 2008 at 09:30 AM PDT #

1. I think I will start with Ruby just because of this (very) nice screens :)
2. The work you (and others) did on NetBean is amazing. Every day/night now... that I'm coding I enjoying the parks you put there. It's not only the JS stuff - but also the php one.
3. For me - the moment I started using NetBean (and not my best friend for the past 5-6 years... eclipse) for the new GWT project - I knew you won the war :)

All the best.

Posted by Ido on June 16, 2008 at 03:19 PM PDT #

Post a Comment:
Comments are closed for this entry.

Tor Norbye


« August 2016