Wednesday March 21, 2007 I just realized last night that the session slides for my Java One talk are due today! So I did a marathon session, starting at 6am this morning, putting it all together. I just submitted the slides, with a whole 4 minutes to spare before the midnight deadline. That's 18 hours straight with just a short dinner break. Phew.
So I'm going to cheat for this week's Ruby screenshot. Take a look at the following picture; it shows two new NetBeans 6 features applied to Ruby: Local editing file history (with version diffing), and the brand new diff view. I've long thought that the Mac OSX XCode filemerging window reigned supreme, but with the new smooth spline curves and even character diffing within lines, I have a new favorite! This file is not under version control - the local file history feature tracks local edits and lets you diff auto-saved versions.
I know this is cheating since all I did was bring up a Ruby editor on non-Ruby related functionality. But there have actually been some great improvements in the Ruby support in the last week. First, the Ruby debugger support has landed! Second, native Ruby execution should now be working finally on Unix, including with Rails. There are some other changes too (plus some pending one I'm about to check in). Check the wiki for installation instructions - to get fast debugging you'll need to perform some manual steps.
Zzzz
(2007-03-21 00:08:25.0) Permalink Comments [11]
Cripes, that's downright beautiful!
It's gotta be slow. Tell me it's slow. I want to want it less. : )
Posted by Gulli on March 21, 2007 at 03:21 AM PDT #
Hi Tor,
I know that local history feature is going to be really useful. I just found the "Go To Action/View" shortcut as well which makes me very happy.
A couple of quick questions: Are we going to have a shortcut to the relevant test classes from our controllers and models? And, are you going to support .rjs files in a Rails project?
Posted by james on March 21, 2007 at 06:38 AM PDT #
Posted by Casper on March 21, 2007 at 09:30 AM PDT #
Hi Gulli - actually, it's not slow at all (at least not on my system). Try it!
Hi James - Do you have any specific ideas on how the shortcuts to the tests should work? At one point I was thinking a single key combination could cycle through controller -> helper -> test -> view -> controller.... But maybe that's just annoying. Another possibility is to have a single "test" navigation action, like the action/view which would toggle between them. That should be helpful in non-Rails Ruby projects as well (although unlike JUnit and Rails I'm not sure there's a clean way to find unit tests for a class when they're not embedded in the class.
I'll have to look into .rjs support.
Posted by Tor Norbye on March 21, 2007 at 04:49 PM PDT #
Posted by Tor Norbye on March 21, 2007 at 04:55 PM PDT #
Posted by andreas on March 22, 2007 at 03:36 AM PDT #
Posted by Tor Norbye on March 22, 2007 at 12:16 PM PDT #
Thanks, that's the right combination for Windows.
PLEASE keep up the superb work!
Best regards,
andreas.
Posted by andreas on March 22, 2007 at 01:56 PM PDT #
Posted by 75.183.6.44 on March 22, 2007 at 07:12 PM PDT #
Hi Tor
Cycling through all controllers/models/views/tests would be a pain :)
I know that radrails/aptana uses ctrl+shift+T as the shortcut to take you through to the relevant test, mapping views and controllers to the appropriate functional tests and models to their unit tests. You may have trouble making the shortcut more fine grained that simply opening the relevant file as there could be many test cases for a particular action/view. Although for functional tests you could jump to the first occurrence of an action request like:
You also have the situation where views are not always .rhtml files. Is it possible to bind a shortcut to anything within a particular view directory to the appropriate test? Then the shortcut would work in .rss/.atom/.rjs/.xml/.my_new_microformat files as well.
Another rather neat little action in radrails is the ability to extract a portion of a view to a partial, bound by Ctrl+Alt+X. This simply cuts the highlighted code from your view and asks you for the name of your partial before creating the new file - beginning with an underscore - and pasting the code into it.
Posted by james hoskins on March 23, 2007 at 02:50 AM PDT #
Posted by Si on March 25, 2007 at 09:46 AM PDT #