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 65389 - [50cat] Recording macros doesn't work properly
Summary: [50cat] Recording macros doesn't work properly
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Macros (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
: 64693 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-29 17:14 UTC by dmocek
Modified: 2007-11-05 13:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dmocek 2005-09-29 17:14:17 UTC
[ BUILD # : 200509261930 ]
[ JDK VERSION : 1.4.2_xx ]

Choose Edit->Start Macro Recording.  In the editor, hit the down arrow to move to the next line.  Choose Edit->Stop Macro Recording.  The 'Recorded Macro' dialog displays.  Give the name 'Down Line'.  Click the 'Add' button to add a key binding.  Hit Ctrl-N.  This is assigned to 'New File', but NB let me assign it anyway.  The first time I did this, hitting Ctrl-N displayed the 'New File' dialog.  I played around with it more (e.g. assigned Ctrl-Shift-Q to the shortcut), then it worked as expected.  I added the macro again (caret-down) with the shortcut 'Ctrl-N' and NB finally gave me a warning 'Ctrl-N' is already assigned to 'New File'.  I tried it yet again using 'Ctrl-N' and it didn't give me the warning and overrode 'New File'.
Comment 1 Martin Roskanin 2005-11-08 10:14:07 UTC
*** Issue 64693 has been marked as a duplicate of this issue. ***
Comment 2 Max Sauer 2006-05-02 09:09:51 UTC
This issue is still valid and very nasty, it is easy to override shortcuts
without any warning, ie. Ctrl-S.

Old TM -- changing to TBD.

--------
NB 5.5beta b200605020200, JDK 1.6.0 b81
Solaris 10/Sparc
Comment 3 Miloslav Metelka 2006-06-09 15:53:25 UTC
I guess the first time you don't get the warning the first time as Ctrl+N is a
global shortcut (not editor specific). Once you assign the Ctrl+N shortcut in
the first step then you start to get a warning.
 We need to examine the system shortcuts as well. Reassigning to Vita. IIRC
MacroSavePanel is where the shortcut gets assigned. Unfortunately it's in
editor/lib where the IDE specific things should not be used but IMHO the Stop
macro recording action could be overriden in NbEditorKit in editor/src and
MacroSavePanel could be subtyped to NbMacroSavePanel under editor/src or any
other suitable solution could be found.
Comment 4 Vitezslav Stejskal 2006-06-27 06:47:00 UTC
It looks like the problem is when assigning a keyboard shortcut to a macro right
after it's been recorded. I can see two problems:

1. The 'Recorded macro' dialog does not check the global shortcuts.
2. It doesn't assign the shortcut properly, because the shortcut is not shown in
the Tools|Options dialog. The Tools|Options shortcut editor on the other hand
seems to work fine - assigns shortcuts correctly and checks the global shortcuts.
Comment 5 Vitezslav Stejskal 2007-07-17 11:03:10 UTC
Fixed with #107385. The save macro dialog now uses the same mechanism as Tools-Options -> Keymap. Therefore it checks
all assigned shortcuts and gives a warning when you try to reassign a shortcut, which is already assigned. If you
confirm that the shortcut is reassigned (#1). It also refreshes the keymap model in Tools-Options, so the newly assigned
shortcuts should be visible (#2).
Comment 6 Vitezslav Stejskal 2007-07-17 11:04:56 UTC
*** Issue 65199 has been marked as a duplicate of this issue. ***