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 7912

Summary: Feature request: Keyboard shortcuts for build targets
Product: projects Reporter: John Zollinger <jzollinger>
Component: AntAssignee: issues@projects <issues>
Status: CLOSED FIXED    
Severity: enhancement CC: issues
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 7987    
Bug Blocks:    

Description John Zollinger 2000-10-13 20:25:56 UTC
It would be nice if keyboard shortcuts could be assigned to the build targets
in an ant build file.  The currently set shortcut should appear on the same
node as the build target similar to how shortcuts are displayed for menu item
actions.

For example, the user should be able to assign the shortcut 'F9' to
the 'compile' build target of their ant build file.

While it would be nice to assign custom short cuts for every build file in a
project differently, perhaps this would be best implemented so that build
target names are matched against a known list that shortcuts are mapped to.  So
for example, the user could define that the target 'compile' will always be
assigned to F9, etc.  This enable you to use most ant build files without
having to configure each project individually.

This will make it much easier to run frequently used build targets without
having to navigate to the build file, expanding the tree, and then running the
appropriate target.
Comment 1 Jesse Glick 2000-10-24 11:18:59 UTC
Deferred for later.

I think there are some UI questions that should be resolved first. For a start,
you should be able to set an Ant build file as a project main class (I think it
needs to implement ExecCookie first--this is the primary bug). Then Execute
Project action would run a test target of your choice. Further, it should
implement CompilerCookie so that you can add a link to the Ant script to your
Projects tab, and Build Project action (also Execute Project) would
automatically compile it. This would provide consistency with general NetBeans
UI.

Assigning shortcuts to objects, rather than actions, is definitely nonstandard
so I am not sure if it is a good idea. Perhaps a way to create links to
individual targets, as well as whole build files, in the Projects tab would
satisfy most of the need (other than easy keyboard navigability). At least you
would not have to search to find the target you wanted.

As for binding F9 to <target name="compile">: I think this is not the right
approach. Rather, there should be an Ant compiler type which builds a file using
an Ant script. This would make regular F9 (Compile action) work as desired.
Comment 2 Jesse Glick 2000-12-14 13:10:59 UTC
Now in development versions there is full compilation/execution integration, so
F6/F9 does work as you would expect, plus you can assign an Ant script as your
"project main class" and then the usual shortcuts like Execute Project etc.
should work. So I think the main basis of this request is actually implemented.

CC'ing the projects module as an FYI, both about the idea of having custom
shortcuts for particular objects in the project (vs. actions)--this might be
implemented e.g. by creating a special XML DTD representing a javax.swing.Action
instance of a predefined class configured with a target DataObject or
Node.Handle and desired shortcut name (= key), and placing instances in the
Shortcuts/ folder to make a key binding; and the idea of adding links to
arbitrary nodes (not data objects) to the Projects tab (in the trunk, try e.g.
creating system/Projects/Default/Files/foo.ser containing a serialized version
of a Node.Handle) as a different kind of quick link or shortcut. Either of these
things could be useful in conjunction with the Ant module, maybe.
Comment 3 Milan Kubec 2001-06-27 16:02:52 UTC
Verified, IMO implemented, see action "Shortcut to target" in pop-up menu in
Explorer for New|Ant Projects|Shortcut to target.
Comment 4 Jesse Glick 2002-03-01 14:14:59 UTC
x
Comment 5 Jesse Glick 2002-03-01 14:15:32 UTC
Was fixed in 3.3.
Comment 6 Quality Engineering 2003-06-30 14:44:00 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.

Comment 7 Quality Engineering 2003-06-30 14:47:58 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.