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 208042 - Add shortcut for RunLastBuildAction
Summary: Add shortcut for RunLastBuildAction
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
Depends on:
Blocks: 211167
  Show dependency tree
 
Reported: 2012-02-03 13:44 UTC by Jaroslav Tulach
Modified: 2012-04-13 15:01 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2012-02-03 13:44:54 UTC
One of my most frequently used actions is "Repeat last run". I've assigned to it Ctrl-F11 shortcut myself, but whenever I start with empty userdir, I need to set that up again. Moreover I think such shortcut would be useful for everyone.

Can we create such shortcut by default?

diff -r bffee1346c8a projectui/src/org/netbeans/modules/project/ui/actions/RunLastBuildAction.java
--- a/projectui/src/org/netbeans/modules/project/ui/actions/RunLastBuildAction.java     Fri Feb 03 14:19:56 2012 +0100
+++ b/projectui/src/org/netbeans/modules/project/ui/actions/RunLastBuildAction.java     Fri Feb 03 14:44:13 2012 +0100
@@ -56,6 +56,7 @@
 import org.netbeans.spi.project.ui.support.BuildExecutionSupport;
 import org.openide.awt.ActionID;
 import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
 import org.openide.awt.ActionRegistration;
 import org.openide.awt.Actions;
 import org.openide.awt.DynamicMenuContent;
@@ -71,7 +72,10 @@
  */
 @ActionID(id = "org.netbeans.modules.project.ui.Rerun", category = "Project")
 @ActionRegistration(displayName = "#LBL_RunLastBuildAction_general", lazy=false)
-@ActionReference(path = "Menu/BuildProject", position = 1000)
+@ActionReferences({
+    @ActionReference(path = "Menu/BuildProject", position = 1000),
+    @ActionReference(path = "Shortcuts", name="D-F11")
+})
 public final class RunLastBuildAction extends AbstractAction implements ChangeListener, Presenter.Menu, Presenter.Toolbar {
     
     public RunLastBuildAction() {
Comment 1 Jesse Glick 2012-02-14 17:31:42 UTC
No problem from me, but who controls the NB keymap?
Comment 2 Antonin Nebuzelsky 2012-02-21 18:29:22 UTC
Petr, Rich, could you help Jesse by confirming if CTRL+F11 can be used for Repeat Last Run action as a new global shortcut?
Comment 3 richgunther 2012-02-21 18:41:09 UTC
Antonin,
I can't speak as to whether or not Ctrl-F11 is in use elsewhere, but it doesn't appear to be.  Note that the only other IDE that uses this convention is Eclipse.  By default Ctrl-F11 will build and run the currently selected file, but in preferences you can customize this so that it will build and run the last file that was built/run.  All the other IDEs have different keyboard shortcuts for this action and actions similar to it.

Rich
Comment 4 Jesse Glick 2012-02-21 19:51:36 UTC
core-main #ba4e0271f590
Comment 5 Quality Engineering 2012-02-22 11:02:27 UTC
Integrated into 'main-golden', will be available in build *201202220400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ba4e0271f590
User: Jesse Glick <jglick@netbeans.org>
Log: #208042: Add shortcut for RunLastBuildAction
Comment 6 Jaroslav Tulach 2012-02-26 22:14:26 UTC
Thanks.