Wednesday June 20, 2007 Phew - it's been a very busy past couple of weeks. We had feature freeze for NetBeans 6 just a couple of days ago (Friday night at midnight to be exact) so I was focusing all my energy on getting as many things done as possible by the deadline. From here on out, focus will be on stability. I'm starting to work my way through the bug list, and it's looking promising.
The feature I'd like to show this time is a recent addition: Improved RHTML support. In particular, RHTML completion, RHTML goto declaration, and displaying Ruby errors in RHTML files.
Here's RHTML completion (click for full size):
Things to notice here is that first of all, the various methods you might want completion (and more importantly, documentation) for that are coming from ActionView are showing up as expected - link_to, form_tag, and so on. In addition, methods from your Helper class for this controller also show up. There's also an inherited attribute from ActionView here.
Second, note the enhanced display of the rdoc. It turns out lots of Rails documentation have code snippets, and the colorizer (which I discussed recently) now properly handles language embedding too - RHTML fragments containing Ruby and HTML colors.) Speaking of colors, NetBeans 6 recently got a makeover in the default color scheme. In addition, there are some new color themes available in the options dialog - including the old colors. You can see the new colors in these screenshots.
Go To Declaration is pretty self explanatory - it works the same way that it does in Ruby files; hold the Ctrl-key and click on identifiers and it will warp to the definition for that method, class or variable assignment. Another new feature is displaying source errors in the file. Behind the scenes, NetBeans now models what ERB will do to the file in a Rails server, and maps these errors back to the RHTML source. Thus, if you have an error like the below, you get an error annotation with a tooltip displaying the error:
One thing which is still missing is indentation of the Ruby code in RHTML files. Marek Fukala is working on this for all the embedded languages, and I believe this feature is still going in after the freeze, so look for it in upcoming builds.
Finally, thanks to those of you who have been using the regular builds and providing feedback and bug reports. I apologize for the last couple of weeks - because of the heavy feature focus before the deadline I haven't been very responsive, and the builds have gone through a huge amount of flux. One of the things which is going on is that all the keyboard shortcuts have been changing - the details are outlined here - so if you thought something was broken, perhaps it's just using a different shortcut now. (We're still tweaking this.) Things will get more and more stable from day to day now. Milestone 10 should be out in a couple of weeks.
(2007-06-20 09:40:09.0) Permalink Comments [45]
Posted by Matt Lins on June 20, 2007 at 10:10 AM PDT #
Posted by hemant kumar on June 20, 2007 at 11:28 AM PDT #
Posted by Steve Molitor on June 20, 2007 at 02:31 PM PDT #
Posted by doug livesey on June 21, 2007 at 12:36 AM PDT #
Posted by Jerrett on June 21, 2007 at 09:40 AM PDT #
Posted by Dan on June 21, 2007 at 09:45 AM PDT #
Hemant, sorry, it's not implemented yet... but I think fixing goto-declaration for render to handle render and redirect falls under the umbrella of bugfixing so can still be done for 6.0, time permitting.
Steve, the best way to submit bug reports is using the netbeans issue tracker. That ensures that your feedback won't get lost and you get notified when it's integrated etc. (Plus if I need followup information I know where to go rather than try to locate the feedback in past blog entries, direct e-mail, other people's blogs etc. :) I have a summary of the feedback options here: http://wiki.netbeans.org/wiki/view/RubyFeedback.
Jerrett and Dan, since we're after feature freeze, can you rephrase that as a bug report please ? ;-) Seriously though, since I already support .mab files, having them reflect ActionView context is arguably a bug fix. It will have to wait until after M10 since we're only fixing showstoppers right now though. Hopefully in a dev build in a week or two.
Posted by Tor Norbye on June 21, 2007 at 10:34 AM PDT #
Posted by p-daddy on June 21, 2007 at 01:29 PM PDT #
Posted by Steve Molitor on June 22, 2007 at 10:34 AM PDT #
Posted by Dan on June 22, 2007 at 10:58 AM PDT #
I have a few questions:
Posted by Emmanuel Oga on June 22, 2007 at 12:49 PM PDT #
Steve, four hours of indexing time is really abnormal, unless you have some really giant gems in your application. (Where is it spending its time? In vendor/ in your rails app or do you know more specifically what it's working on? Any errors in the log?) More likely there's something pathological in your index which makes merging really slow. Try just exiting, deleting the "var/cache/gsf-index/" part of your user directory; anything in var/cache can be deleted - there's no configuration there, everything will be recreated, and then restart. I've seen some warnings about multiple entries in the index so I'm going to have to look into that some more.
I'm not aware of a way to single-click to open files. I've gotten several requests for "test current method" so I'll definitely to do that. A green-bar thingy would be great too. So many things to do, so little time :)
Emmanuel, I'd like to colorize the output but it's not possible today (the I/O window isn't doing proper terminal emulation, and there's no way to set colors there - it just has builtin hyperlink coloration. I've requested this so hopefully it can be enhanced and I'll take advantage of it.)
This is related to JRuby in the sense that it's using JRuby (for parsing to do the semantic editing features), and it supports JRuby usage. But it doesn't require JRuby usage; NetBeans should also be a great Ruby IDE for developers who want to write pure Ruby applications. Sun is officially sponsoring this; lots of full time Sun engineers (me included) work on NetBeans, and Sun hired several JRuby core developers as well.
Posted by 75.48.78.241 on June 22, 2007 at 03:50 PM PDT #
Steve, four hours of indexing time is really abnormal, unless you have some really giant gems in your application. (Where is it spending its time? In vendor/ in your rails app or do you know more specifically what it's working on? Any errors in the log?) More likely there's something pathological in your index which makes merging really slow. Try just exiting, deleting the "var/cache/gsf-index/" part of your user directory; anything in var/cache can be deleted - there's no configuration there, everything will be recreated, and then restart. I've seen some warnings about multiple entries in the index so I'm going to have to look into that some more.
I'm not aware of a way to single-click to open files. I've gotten several requests for "test current method" so I'll definitely to do that. A green-bar thingy would be great too. So many things to do, so little time :)
Emmanuel, I'd like to colorize the output but it's not possible today (the I/O window isn't doing proper terminal emulation, and there's no way to set colors there - it just has builtin hyperlink coloration. I've requested this so hopefully it can be enhanced and I'll take advantage of it.)
This is related to JRuby in the sense that it's using JRuby (for parsing to do the semantic editing features), and it supports JRuby usage. But it doesn't require JRuby usage; NetBeans should also be a great Ruby IDE for developers who want to write pure Ruby applications. Sun is officially sponsoring this; lots of full time Sun engineers (me included) work on NetBeans, and Sun hired several JRuby core developers as well.
Posted by Tor Norbye on June 22, 2007 at 03:50 PM PDT #
Posted by addam on June 23, 2007 at 03:50 AM PDT #
Posted by Tor Norbye on June 23, 2007 at 08:38 AM PDT #
Posted by Dan Baxter on June 23, 2007 at 01:55 PM PDT #
Posted by Steve Molitor on June 23, 2007 at 09:09 PM PDT #
Posted by Steve Molitor on June 23, 2007 at 09:10 PM PDT #
Posted by Stephen Molitor on June 24, 2007 at 09:16 AM PDT #
Posted by Klaasjan Tukker on June 25, 2007 at 11:12 AM PDT #
Steve, I don't know why bold doesn't work for the Monaco font; I see the same behavior on my Mac. It works for other fonts... Perhaps a OSX JVM issue? I downloaded JEdit and changed the font there - it's the same issue; choosing Bold for Monaco has no visual effect, so I it's probably a VM issue.
There's no way to filter out the vendor directory at the moment. However, I'm planning on changing things a bit such that vendor and lib no longer show up in the project view (but still are used for source indexing etc.).
I'm not sure what the code template issue is. Are you using the extra CodeTemplates module, or just the built in code template support in the Preferences panel? (Editor -> Code Templates). The latter work for me. (The optional module may need some work to reflect recent changes in the code template infrastructure).
Klaasjan, thanks for the pointer!
Posted by Tor Norbye on June 25, 2007 at 11:51 AM PDT #
Posted by James Moore on June 25, 2007 at 12:13 PM PDT #
Posted by Tor Norbye on June 25, 2007 at 12:27 PM PDT #
Posted by James Moore on June 25, 2007 at 12:59 PM PDT #
When you are editing your Controller actions, if you press ctrl+shift+a to go to the proper view, nothing happens if you don't have one created.
It will be very nice and usefull if the ide would ask me if i wan't to create that view.
Thanks again! Emmanuel.
Posted by Emmanuel Oga on June 25, 2007 at 01:26 PM PDT #
Posted by 70.43.126.249 on June 25, 2007 at 01:33 PM PDT #
Posted by 70.43.126.249 on June 25, 2007 at 02:00 PM PDT #
Posted by Steve Molitor on June 25, 2007 at 03:33 PM PDT #
Posted by 70.43.126.249 on June 25, 2007 at 05:49 PM PDT #
Posted by Gili on June 25, 2007 at 09:51 PM PDT #
Posted by Warren Wessels on June 26, 2007 at 12:13 PM PDT #
Posted by freeman on June 26, 2007 at 06:58 PM PDT #
Posted by Shadowfiend on June 27, 2007 at 08:35 AM PDT #
Regarding hyperlinks not working: Can you e-mail me - tor.norbye@sun.com (or file a bug) with the exact output that wasn't hyperlinked? That way I can check what the problem is with the path recognizer (and add a unit test for it). I did fix some bugs in this area yesterday but there may be more.
Steve, I see the problem with smart selection keybindings myself. I'll look into it.
Gili, thanks - I'll forward your feedback to the team looking at keybindings and other defaults.
Warren, the issue with the IDE restarting itself is a bug in the startup script related to Auto Update (the startup script cooperates with Auto Update when Auto Update is used to restart the IDE). I seem to remember that it's Mac specific, but in any case, it's being fixed. Just ctrl-c out of the restarted IDE for now.
Freeman, thanks for the suggestion; it's a good time to bring it up since I'm looking into formatter bugs right now. But as Shadowfiend pointed out, all examples I'm coming across in the Ruby libraries seem to indent when at the same level as case (and else and end). When I get to the Pretty Printer and more detailed formatting options I'll try to remember to add an option for this.
Posted by Tor Norbye on June 27, 2007 at 12:53 PM PDT #
Posted by Steve Molitor on June 27, 2007 at 02:10 PM PDT #
Posted by Warren Wessels on June 27, 2007 at 02:20 PM PDT #
Posted by freeman on June 27, 2007 at 06:19 PM PDT #
On the negative side, I have yet to be able to get subversion to work. And the user experience is terrible, even if I could get it working.
* Fails mysteriously with cygwin's svn in the path * doesn't seem to recognize an explicitly set svn binary through the options window
* NetBeans just hangs when non-cygwin svn.exe is in the path and I do 'show changes'
* Relies on yet another external utility, plink, to do svn+ssh
Compare this to the experience on Eclipse, where things just work as long as you use their native java subversion support. No messing around with external utilities - external utilities are the kiss of death for Windows.
Posted by James Moore on June 29, 2007 at 09:00 AM PDT #
Posted by hemant kumar on June 30, 2007 at 04:40 AM PDT #
Posted by Matt Verran on July 02, 2007 at 07:53 AM PDT #
Posted by freeman on July 03, 2007 at 06:16 PM PDT #
Posted by hemant kumar on July 04, 2007 at 12:05 PM PDT #
Posted by James Moore on July 04, 2007 at 06:07 PM PDT #
Hemant, I didn't know there was a problem with YAML editing; if you can file a report with details to reproduce and platform info, that would be great. (It works for me so some more details would help.).
Regarding RHTML editing performance: Do you have JavaScript embedded in your files? In that case it's probably issue 108874. There are some other high priority bugs in this area too - issue 105423, issue 106547, issue 108889, and <a href="http://languages.netbeans.org/issues/show_bug.cgi?id=108813">issue 108813 .
I have evaluated these, but they are in other areas than the Ruby support so I can't easily fix them myself. But I will try to push for a speedier resolution.
Now some quick responses to the other ideas:
Posted by Tor Norbye on July 06, 2007 at 09:54 AM PDT #
Posted by hemant kumar on July 09, 2007 at 02:46 AM PDT #