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.

Bug 120088

Summary: Add ability to run external script with information about the code at the cursor location
Product: ruby Reporter: jamespb <jamespb>
Component: CodeAssignee: issues@ruby <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description jamespb 2007-10-25 19:36:44 UTC
I want a function that runs an external arbitrary file (presumably containing
ruby code, but could be anything - sed, awk, whatever) like this:

ruby script/nbhelper  --class Fully::Qualified::Module::Name
                        --method method_containing_cursor
                        --selection_start_character_position N
                        --selection_end_character_position N+X
                        --selection_start_line M
                        --selection_end_line M+X
                        --file /path/to/the/ruby.rb
                        --invoked_by control-shift-backslash


nbhelper would be supplied by the user, not by netbeans.

nbhelper runs and changes the .rb file being edited (and if you can
tell us which keystroke ran it, we could have different keystrokes do
different things).  It's emacs/vi/whatever piping stuff through a
shell command, but with more information about the code selection
passed along.  (Someone will probably want JParseTree pretty quick if
it doesn't exist already.)

It'd be great if it could get into the hints menu somehow.