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 153235

Summary: Scriptable action bindings for autoprojects
Product: projects Reporter: Jesse Glick <jglick>
Component: AutoprojectAssignee: issues@projects <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 153231    
Bug Blocks:    

Description Jesse Glick 2008-11-14 17:30:22 UTC
Currently when binding actions in autoprojects,

1. You can only bind project-sensitive actions. There is no possibility to bind e.g. F6 to some custom impl, whether to
override the default JavaRunner-based file run for *.java, or to support running a different file type.

2. You can only invoke an Ant target. It would be nice to have more flexibility.

E.g. the langtools freeform projects in OpenJDK have a custom binding for running (and debugging) JTReg-based tests:

<action name="run.single">
    <target>jtreg</target>
    <context>
        <property>jtreg.tests</property>
        <folder>${root}/test</folder>
        <pattern>\.(java|sh)$</pattern>
        <format>relative-path</format>
        <arity>
            <separated-files>,</separated-files>
        </arity>
    </context>
</action>

It ought to be possible to make such a binding for an autoproject. You would likely need to hand-edit
netbeans.properties (see issue #153231) and ask to load functions from a sister netbeans.js or whatever. The script
engine running such actions would need standard bindings for e.g. running an Ant target.
Comment 1 Jesse Glick 2009-10-22 01:59:57 UTC
Example:

# implicit param 'selection' is list of filename
action.run.single=script:ruby:selection.each |f| {load f}
Comment 2 Martin Balin 2016-07-07 08:37:53 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss