Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 214461 - Unable to set shortcut for actions in Options->KeyMap
Unable to set shortcut for actions in Options->KeyMap
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Key bindings
7.2
PC Linux
: P3 (vote)
: 7.2.1
Assigned To: Svata Dedic
issues@editor
72patch1-verified
:
Depends on: 216257
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 17:49 UTC by mjr_1974
Modified: 2012-09-10 12:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
KeyMaps before setting new shortcut (15.92 KB, application/zip)
2012-06-26 13:06 UTC, mjr_1974
Details
KeyMaps after setting new shortcut (16.36 KB, application/zip)
2012-06-26 13:07 UTC, mjr_1974
Details
Image of the Options Dialog (117.42 KB, image/png)
2012-06-26 13:30 UTC, mjr_1974
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mjr_1974 2012-06-19 17:49:15 UTC
Product Version = NetBeans IDE 7.2 Beta (Build 201205031832)
Operating System = Linux version 2.6.35-32-generic running on amd64
Java; VM; Vendor = 1.7.0_03
Runtime = Java HotSpot(TM) 64-Bit Server VM 22.1-b02

Hi, I think the installation process should import existing shortcuts from previous Netbeans installs automatically. Also, when I am trying to set a new shortcut, I can see it in the KeyMap window as soon as I press it, but after hitting OK it is not saved and does not work. If I open the KeyMap window after closing it with the OK button, the shortcut definition is gone.
Comment 1 Svata Dedic 2012-06-20 08:11:14 UTC
Trying in build 2012-06-19, at least on the 1st sight they keymap (the key binding is present after I return to the T-O-Keymap dialog). I've tried to (re)define two bindings, one for global action and another for editor action, and the storage seems to have them both & they appeared after restart, too.

Please describe exact steps, note actions which you are trying to assign key bindings.
Comment 2 mjr_1974 2012-06-20 23:03:20 UTC
Open IDE (which opens the project I am working on), go to Tools > Options to display the Options Dialog, then click on KeyMap, go to Debug Focused Test Method Action, click in the shortcut column cell to set the shortcut, press down Ctrl, then Shift, and hit the D key. Release all keys and hit Enter. The shortcut is displayed in the column. Press OK to close the dialog. Try the shortcut (it won't work). Repeat steps to Open the KeyMap table and you will notice the shortcut you previously set is gone (empty cell).
Comment 3 Svata Dedic 2012-06-26 08:46:35 UTC
Still works for me - I followed the steps and ended up with a redefined Debug Focused Test method - Build 20120626-395727d571d8

Please zip the contents of your userdir/config/Keymaps prior to the reproduction, then please try to assign the key as you've described, then again zip the directory and attach both archives here.

Also it could be good if you could try to reproduce the defect with a fresh userdir: use --userdir /tmp/bug load your project and try to reproduce the defect.

It may be that your IDE starts from a already screwed settings (should recover from that situation of course!)

Thanks for cooperation
Comment 4 mjr_1974 2012-06-26 13:06:27 UTC
Created attachment 121366 [details]
KeyMaps before setting new shortcut

This is the keymap before trying to assing a new one.
Comment 5 mjr_1974 2012-06-26 13:07:20 UTC
Created attachment 121368 [details]
KeyMaps after setting new shortcut

That's it... let me know if you need more info.
Comment 6 mjr_1974 2012-06-26 13:30:14 UTC
Created attachment 121372 [details]
Image of the Options Dialog

One weird thing to notice is that CS-D.shadow is in the KeyMaps/Netbeans folder, but it is not showed in the keymap (see attached picture).
Comment 7 mjr_1974 2012-07-07 16:47:05 UTC
This is still an issue in 7.2RC1, and assuming most of us update versions and import previous settings, it needs to be addressed.
Comment 8 Jiri Prox 2012-07-12 13:03:03 UTC
I cannot reproduce the problem even with provided keymap setting. Can you attach whole userdir? (without cache). Does the problem persists when you launch IDE with fresh userdir?

Thanks
Comment 9 mjr_1974 2012-07-12 15:03:15 UTC
This is my .netbeans folder in Ubuntu 12.04 AMD64:

https://dl.dropbox.com/u/7707848/Netbeans/netbeans.zip

Please let me know you got it.
Comment 10 mjr_1974 2012-07-16 13:38:49 UTC
Why is this still marked as incomplete? Changed it to reopened...
Comment 11 wburzyns 2012-07-25 12:27:03 UTC
I'm having this problem too. I tried to assign free shortcut Shift+F6 to Debug Focused Test Method. The shortcut was accepted. I pressed OK and the option window closed. Unfortunately the shortcut didn't work. When I reopened the keymap window it turned out that Debug Focused Test Method had no shortcut assigned to it.

I confirmed the above behavior on Build 201206291011 and on Build 201207171143.
The other parameters of my system are:
Java: 1.6.0_29; Java HotSpot(TM) Client VM 20.4-b02 
System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb)
Comment 12 Svata Dedic 2012-08-01 13:13:04 UTC
mjr - please check your logfiles. When you try to assign CS-D, and the assignment is (again) missing after you open the key binding dialog again, see if you log file contains something like:

org.openide.filesystems.FSException: File CS-D.shadow already exists in filesystem Default System (Keymaps/NetBeans).

Regarding your specific situation, assigning CS-D to "Debug focused test": the userdir you have attached contains a definition of such shortcut. Was it imported from a previous version ? Anyway, the shortcut leads to an obsolete action definition. The definition has moved, but the shortcut was left unaffected, so it broke.
Because of other defects, the existing CS-D.shadow (broken) file prevented redefinition to be written to the disk - if your logfile contains the above message.
Comment 13 Svata Dedic 2012-08-01 14:23:05 UTC
Changeset: e7cfe094dc6c
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-08-01 16:22
Message:   Issue #214461 - Unable to set shortcut for actions in Options->KeyMap: fixed
Broken shortcut links are removed if the user changes/defines the shortcut.
Comment 14 Svata Dedic 2012-08-01 14:24:15 UTC
After the change above propagates, you should be able to define the broken shortcut again. After issue #216257 is fixed, JUnit shortcuts defined in 7.1 should migrate to 7.2 automatically.
Comment 15 netbeans.89423 2012-08-02 09:02:17 UTC
Problem still there with "run focused test" after upgrade from 7.1.2.
Comment 16 Svata Dedic 2012-08-02 09:10:16 UTC
(In reply to comment #15)
> Problem still there with "run focused test" after upgrade from 7.1.2.

The changeset e7cfe094dc6c was not yet propagated into main-silver/gold. Unless you build your NB yourself from jet-main hg repository,
- wait for the integration, then grab daily build
- for a CLEAN upgrade, wait for the issue #216257 (as was described in previous comments) and integrated

please confirm that you used fresh custom build, or I'll close the defect again as fixed.
Comment 17 Quality Engineering 2012-08-03 02:33:37 UTC
Integrated into 'main-golden', will be available in build *201208030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e7cfe094dc6c
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #214461 - Unable to set shortcut for actions in Options->KeyMap: fixed
Broken shortcut links are removed if the user changes/defines the shortcut.
Comment 18 Svata Dedic 2012-08-03 06:40:39 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Problem still there with "run focused test" after upgrade from 7.1.2.
> 
Most probably reporter error. Closing again.
Comment 19 Stepan Zebra 2012-08-31 09:44:24 UTC
verified in trunk, please integrate
Comment 20 Svata Dedic 2012-08-31 14:29:39 UTC
backported as http://hg.netbeans.org/releases/rev/9458b7bc2cb3
Comment 21 Quality Engineering 2012-09-01 11:06:37 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/9458b7bc2cb3
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #214461 - Unable to set shortcut for actions in Options->KeyMap: fixed
Broken shortcut links are removed if the user changes/defines the shortcut.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo