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 69424 - Allow to run macros without assigned shortcut
Summary: Allow to run macros without assigned shortcut
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Macros (show other bugs)
Version: 7.3
Hardware: All All
: P1 blocker with 5 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 41740 44801 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-28 11:49 UTC by _ lcincura
Modified: 2013-10-13 11:55 UTC (History)
1 user (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 _ lcincura 2005-11-28 11:49:32 UTC
I have not found any way how to run a macro, which does not have a shortcut
assigned. It is common in some projects, that some amcros are run from time to
time (before public releases or so), and it makes no sense to assign shortcut to
these macros. Easier is to create the macros, name them correctly and then
select such a macro from some list and run it.
I have not found such a feature in NB. Pesonally I have a feeling every shortcut
is already assigned to some action, so finding a meaningfull shortcut for macros
is a pain. And so is remembering shortcut for macros I do not use often.
Comment 1 Vitezslav Stejskal 2007-01-15 22:17:56 UTC
*** Issue 44801 has been marked as a duplicate of this issue. ***
Comment 2 Vitezslav Stejskal 2007-01-15 22:20:23 UTC
*** Issue 41740 has been marked as a duplicate of this issue. ***
Comment 3 eskild 2008-05-05 14:24:10 UTC
I *really* miss this feature. Really, really, deeply. Heck, I'll even fire up Emacs on occasion, just to do this kind of
thing. In particular, if I need to run the same macro several times in a row in a file, firing up Emacs and "just do it"
is much, much quicker than dancing with Netbeans.
Comment 4 pohl 2008-11-21 02:12:53 UTC
I just discovered this limitation.  (In fact, at the moment, I'm not even sure how to assign a shortcut to run a macro!  - but that's beside the point).

I suggest an editor action called "Run Last Macro" that one can assign a more universal short cut to.    The action would simply run the last macro recorded.

In addition to this, one would need to be able to record an anonymous macro.  That is, the dialog box should not force a user to name their macro, if they 
intend their macro to only be invoked by the aforementioned new editor action.

Just some rough thoughts.
Comment 5 pohl 2008-11-21 02:16:27 UTC
FWIW, as soon as I posted that last comment, i discovered how to assign a shortcut to a macro:
 
 Preferences --> Keymap --> Editor Macros  ...and viola, there is the named macro i recorded.

I'd still like an anonymous, disposable macro facility described in this issue, though.
Comment 6 superole2 2012-07-10 15:38:13 UTC
1. I agree that there should be other ways of running macros than assigning a shortcut to it. Shortcuts are very cumbersome for use with macros.
It would be helpful with a "Run Macro" submenu in the "Edit" or "Tools" menus, listing all recorded macros. Or to be able to add a custom button to any toolbar and assign a macro to it.

2. I also like the idea of anonymous/disposable macros for shortlived repetitive tasks, with standard shortcuts. Sort of like a copy/paste feature for actions. 
To make it simple one could have "Alt+C" assigned to copy macro(start/stop recording anonymous macro to clipboard), and "Alt+V" assigned to paste macro (run the macro currently on the clipboard)
Since the macros are stored as text, I assume that one could actually use the normal clipboard, thus enabling copy/paste as text with "Ctrl+C"/"Ctrl+V" for easy sharing or storing as a named macro through the "Tools -> Options -> Editor -> Macros" dialog, with no extra effort.
Comment 7 simuloid 2013-10-13 11:55:35 UTC
Just pick an unused key combination and think of it as the shortcut for "run last macro".  Then, when you create a macro to do some editing action, always give it the key combination you've chosen.  et voilla! The only thing missing is a menu item for "run last macro."