Ruby Screenshot of the Week #5

Tim Bray just posted an entry on his first experiments with the Ruby and NetBeans support and in particular, talks about the syntax highlighting. I was already planning on spending this week's screenshot on the highlighting features, so I'll use Tim's ape.rb source code and show you a few more details:

Notice the following:

  • Notice how unused local variables are highlighted (see dummy which I inserted to make a point - that's not Tim's fault!).
  • Notice how the symbol under the caret gets highlighted along with all other uses of the same symbol! This is pretty useful when you're dealing with blocks for example - it will show you that a local variable may be used unintentionally as a block variable and will get modified as a side effect.
  • Notice how methods calls are highlighted in bold. This is handy when you have a typo, and what you thought was a local variable read is actually a call to an unbound method.
  • Notice how strings are lexed too. Here you can see that it's telling you (in red italics) "\\n" is not expected as an escape code - this is a single quoted String after all.
  • Embedded Ruby code within Strings - #{ } - is properly shown as Ruby code. Occurrences highlighting and code completion works in these sections too.
Regarding the color choices, I should point out that these colors are consistent with the new colors in the Java support in NetBeans 6 - parameters are orange, fields green, unused items gray, and so on.

In doing this screenshot I noticed a couple of bugs I'm off to fix now!


Super nice! keep up the good work!

Posted by Juan Pablo Tarquino on February 27, 2007 at 06:53 AM PST #

Hi Tor! I also blogged lately about Ruby / Rails IDE comparison (and installation). I elected your NetBeans Module my editor of choice for the moment. Regards

Posted by Sauvray on February 27, 2007 at 09:17 PM PST #

This looks awesome! Can't wait until the final version! Do the current snapshots have debugger facilities?

Posted by None on February 27, 2007 at 09:48 PM PST #

Nope - no debugger yet. I think that's scheduled for M8 - Martin (who's writing it) might be able to provide a more specific date.

Posted by Tor Norbye on February 28, 2007 at 01:23 AM PST #

I would like to finish some more works which will be part of project. Then I would like to provide first version of NetBeans debugger utilizing debug-commons. The debug-commons is the project which (we hope with RDT people, mainly Markus Barchfeld) will serve, in the future, as a kind of starting point for those who wants to implement Ruby debugger frontend. It will also contain intermediate libraries for languages like Java (only Java in the beginning) which make it easier to utilize the debug-commons backends by individual frontends. There seems to be a lot of efforts, some closed-source and some open-source, in the area. So hopefully joining together will work for everybody. Read the history of the project. The biggest deal was done by Markus.

So in short I would like to commit/stabilize in 2-4 weeks. It depends :) Then I would like to concentrate on more features in both frontend and backends.

Posted by Martin Krauskopf on February 28, 2007 at 04:16 AM PST #

Where can I download this? I'm behind corp. firewall so I have no option to grab CVS source tree and compile it myself. I tried but don't know which build to get...

Posted by stinkyminky on February 28, 2007 at 04:58 AM PST #

To get the bits, download NetBeans 6 M7, then go to the Daily update center, and in the "Features" category add "Ruby". That should pull in everything else you need. Be sure to update early & often.

Posted by Tor Norbye on February 28, 2007 at 07:06 AM PST #

Congratulations! :-) When they optimize Ruby/JRuby's speed, it is going to be a marvel.

Posted by Juan on March 02, 2007 at 12:47 AM PST #

Thanks. I have just installed and testing it out. Now, I can use in my mac too. [ I was able to compile it from linux and cygwin/winnt but able to compile netbeans on mac osx ] Sweet!

Posted by stinkyminky on March 04, 2007 at 11:46 PM PST #

Post a Comment:
Comments are closed for this entry.

Tor Norbye


« June 2016