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.
Define a template 'dc' with: # ${cursor} # # Takes: # ${0 default=":foo"} => {$1 default="description"} # # Returns: # # ${3} # # See also: # # ${4} type dc<tab>, and 'o =>' is selected, and the tab stops are also in the wrong places. Product Version: NetBeans Ruby IDE 070906 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
I don't see the same behavior. When I entered that template and expanded it, for me, I get ":foo" as selected, and I can tab through the different tabstops. (P.S. If you intended ${3} and ${4} to just be tabstops instead of containing "3" and "4", you can use ${3 default=""} ). However, I've seen some lexing problems as of yesterday (and filed issue 114836); several RHTML formatting tests are failing. I wonder if this is another symptom.
Weird that it doesn't repro for you. I just tried it in a empty file (thinking it might have been context-dependent) and got the reported behavior. Sounds like I should just try it again when the other lexing problems are fixed. Yeah, the ${3} and ${4} were pretty useless; I was playing with variable substitution and hadn't quite figured it out.
I discovered what the lexer issue was an that's RHTML specific, so wouldn't explain this. But in trying to reproduce it I ran into what is possibly a different bug, or possibly related. I filed a new issue for it, issue 114942.) Also, can you attach your {userdir} / config/Editors/text/x-ruby/CodeTemplates/org-netbeans-modules-editor-settings-CustomCodeTemplates.xml file such that I can take a look at it and reproduce it with your template? Alternatively, -my- dc template definition in that file looks like this: <codetemplate abbreviation="dc" xml:space="preserve"> <code> # ${cursor} # # Takes: # ${0 default=":foo"} => {$1 default="description"} # # Returns: # # ${3} # # See also: # # ${4} </code> </codetemplate> Is yours the same?
Created attachment 48324 [details] user directory
I included my entire userdir. Once this happens, NetBeans editing seems to be in a weird state. I've seen: - unable to save any files - cut looks like it just turns the selected text to spaces; it doesn't adjust the rest of the text in the file - ctrl-shift-end goes to the end of the file, but beeps and I see this status msg in the bottom left corner: Cannot initialize code templates while scanning in process.
FYI, you can repro this with one of the default templates - 'begin' has weird behavior tabbing through the arguments. Just create a new method, type in 'begin<tab>'. Product Version: NetBeans Ruby IDE 20071016112612 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
Is this still reproducible for you in 6.7 M2? I'm not able reproduce.
FYI, I haven't written any Ruby for quite a while - I'm unlikely to install a new NetBeans any time soon, sorry.
Sorry to hear that, you'll be missed in the NB Ruby community - hope you'll get back to Ruby and NB some day.
Without requested information for long time - INVALID. We can't do anything in this case. Reporter, please add requested information and reopen issue. Thanks in advance.