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 119013 - Unable to redefine used shortcut
Summary: Unable to redefine used shortcut
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Key bindings (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P2 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-10-16 09:22 UTC by novakm
Modified: 2007-11-05 13:40 UTC (History)
0 users

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 novakm 2007-10-16 09:22:42 UTC
If you want to use shortcut and it is already defined for another action, OK in that dialog is disabled. So you are
forced to find the action with that shortcut (which is quite difficult even though you know its name and shortcut) and
remove it. I think that not long ago you could push OK which "moved" the shortcut from the original action to that you
specified. IMHO it was MUCH better behavior.

Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710160000)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
Comment 1 Vitezslav Stejskal 2007-10-16 14:06:17 UTC
Well, yes, this was changed not that long ago, but I'm not sure if the shortcut was not moved from the original action
to the new one. IMO it was defined for both actions. And sometimes the new assignment took precedence over the old one,
but sometimes not. Which is why I changed it.

I think that what you suggest makes sense. The shortcut should really be *moved* and the OK button should be enabled in
this case. I'm marking it as an ENHANCEMENT.
Comment 2 novakm 2007-10-17 12:23:16 UTC
Well if you consider it as an enhancement, I'm raising priority. In current state it is HIGHLY annoying that you cannot
use already used shortcut. Without any search and knowledge where to find the old one, it's really difficult to define
your own shortcut.

I hope this enhancement will make it to the final 6.0, because IMHO it decreases usability of customization of the IDE
greatly.
Comment 3 Vitezslav Stejskal 2007-10-17 14:32:05 UTC
If you think this is really seriously broken now, please make it a P2 defect, otherwise it is not likely to get resolved
for nb6. 
Comment 4 novakm 2007-10-17 14:47:55 UTC
OK, I will change it to defect again as it worked before. Maybe it was not clean enough but you could easily redefine a
shortcut and now you can not. Best solution would be to delete that shortcut for old action and set it for new action.
Comment 5 Vitezslav Stejskal 2007-10-18 13:43:01 UTC
Ok, should be fixed now. Shortcuts can be re-used for another action, which means that the original binding is removed
and the new one is added.

Checking in KeymapViewModel.java;
/cvs/core/options/keymap/src/org/netbeans/modules/options/keymap/KeymapViewModel.java,v  <--  KeymapViewModel.java
new revision: 1.6; previous revision: 1.5
done
Checking in ShortcutsDialog.java;
/cvs/core/options/keymap/src/org/netbeans/modules/options/keymap/ShortcutsDialog.java,v  <--  ShortcutsDialog.java
new revision: 1.6; previous revision: 1.5
done
Comment 6 novakm 2007-10-22 09:36:26 UTC
Verified in Build 200710220000. However, maybe the red message reading "Shortcut is already assigned to <action>" could
be complemented about information that pressing OK will redefine the shortcut...
Comment 7 Vitezslav Stejskal 2007-10-22 10:58:34 UTC
Good idea, try it now.

Checking in Bundle.properties;
/cvs/core/options/keymap/src/org/netbeans/modules/options/keymap/Bundle.properties,v  <--  Bundle.properties
new revision: 1.7; previous revision: 1.6
done
Checking in ShortcutsDialog.form;
/cvs/core/options/keymap/src/org/netbeans/modules/options/keymap/ShortcutsDialog.form,v  <--  ShortcutsDialog.form
new revision: 1.4; previous revision: 1.3
done
Checking in ShortcutsDialog.java;
/cvs/core/options/keymap/src/org/netbeans/modules/options/keymap/ShortcutsDialog.java,v  <--  ShortcutsDialog.java
new revision: 1.7; previous revision: 1.6
done
Comment 8 novakm 2007-10-25 09:31:23 UTC
Excellent, now it's really easy to redefine a shortcut and is fully understandable! Verified.