This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Put the cursor in a string, hit shift-alt-. Seems like it should select the string first, then the block the string is in. Product Version: NetBeans Ruby IDE 070803 Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nbrubyide) Userdir: C:\Users\James\AppData\Roaming\.nbrubyide\dev
It already does - at least for my unit tests which covers this. For example, def test "return^ me" end With the caret in the middle of the string (indicated by ^), the first alt-shift-. selects "return me" (including the quotes), the second dot selects the def- block. Does that scenario work for you? If not, I'll need to add some logging to see what happens on your platform. If it does work, it's presumably broken for a different scenario; can you show the full code snippet as well as the caret position?
Darn - sloppy report, I should have captured the text, since I agree it works most of the time. This fails: def self.does_not_reset_timeout define_method_with_value :reset_timeout?, false a = {'foo'} end with the cursor in 'foo' This isn't legal Ruby - I was in the middle of editing it, and wanted to change 'foo'
Thanks. This feature depends on the parse tree, and in the presence of invalid Ruby, the parse tree is incomplete which is why this is happening. I should however be able to switch parts of the code over to using lexical information; I'm already doing that to make smart selection handle comments as a block (comments are not in the AST) and I've been thinking it would be good to do this for strings anyway since the JRuby parse tree is weird when it comes to strings that contain #{}'s.
That sounds like a good idea - seems like a big chunk of the time I want features like this is when I'm in the middle of creating code, so things are incomplete/unparseable.
Too late for 6.7.