« Previous day (Apr 9, 2007) | Main | Next day (Apr 11, 2007) »

20070410 Tuesday April 10, 2007

Ruby Screenshot of the Week #9: Parameter Completion

Code completion now inserts the parameters for the method you select. They are inserted as a live code template such that you can jump from one parameter to the next using Tab or Return. More importantly, the parameters are also displayed as a tooltip over the method call. You can invoke this whenever you're typing in code - not just using code completion. Hit Alt-P (or on the Mac, Ctrl-P) and if the IDE can figure out the method signature of the method call surrounding the caret, it will display the parameter list, and show the current parameter in bold. As you move the caret around, the tooltip will be updated to show which parameter you're currently editing.

Messing with the user's editing workflow is always risky, so please let me know how you feel the new code completion behavior works. The parameter tooltip depends on being able to figure out the signature of the surrounding method call, which depends on type inference, so it may not always work - but it will also improve as I tweak and improve type analysis across code completion, goto declaration, etc.

Also, there is also a Go To Test action now for jumping quickly between a test class and its unit test. Should work in Rails, RSpec, ZenTest, and also between any classes named Foo, FooTest or TestFoo regardless of which files they're in. This action is in the editor context menu, and is bound to Ctrl-Shift-E. To get this stuff, get at least version 0.65 of the Ruby Feature module (see these installation instructions).

P.S. You can find some more information on the Ruby support in an interview I did with Geertjan Wielenga a couple of weeks ago. There are some other interviews in the same series talking about the new language support in NetBeans. The Rails support in NetBeans will soon have improved support for JavaScript, YAML, and RHTML - stay tuned!

(2007-04-10 23:59:52.0) Permalink Comments [26]