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.
Now F5 in menu (as well as in toolbar tooltip) is assign to "Debug Main Project" in fact it's still working for "Continue" (as it worked before) whereas Ctrl+F5 now assigned to "Continue" is working for "Debug Main Project". Please implement UI changes as soon as practical as lots of our debugger tests fail because of that.
Not true. In default "NetBeans" keymap profile, "Debug Main Project" is CTRL-F5. And CTRL-F5 does not work for Continue. "F5" is assigned to "Continue" and does not work for "Debug Main Project". In "NetBeans 5.5" keymap profile, it works exactly vice-versa. "Debug Main Project" is F5 and Continue is CTRL-F5. FYI: In the future, we might enhance F5 to also work as "Debug Main Project" if no debugging session is running - see issue #90133. If you still see the behavior you describe, please provide the build number and keymap profile that you have active.
Actually I get the same in today's build. Product Version: NetBeans IDE Dev (Build 200908171401) Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01 System: Linux version 2.6.28-15-generic running on i386; UTF-8; en_US (nb) I'll attach a screenshot as well as the keymap profile. The problem is that in the Debug menu, the shortcut for Debug Main Project says F5 and for Continue Ctrl+F5, but in reality, F5 will not invoke debug (Ctrl+F5 will) and Ctrl+F5 will not invoke continue whereas F5 will.
Created attachment 86493 [details] Screenshot of the Debug menu
Created attachment 86494 [details] Exported active netbeans profile (should be the default as I do not remember changing it)
O.K. then someone made a regression...
There were no changes in defaults/src/org/netbeans/modules/defaults/mf-layer.xml, so it should behave as I see it in my build 090803.
It still persists in latest trunk build (200908221401). I also get F5 for Debug project and Ctrl+F5 for continue in my custom build I built from trunk this morning (090824).
Not sure where this belongs to, but certainly not to debugger! Regardless of which keymap profile I select, the shortcuts remain the same. It looks like both shortcuts are active - the visible in menus and set in currently active profile.
It seems there is a wrong shortcut in defaults\mf-layer.xml (Ctrl+F5, D-F5.shadow for Debug Main Project). Correct shortcut in the menu is from spi.debugger.ui\src\org\netbeans\modules\debugger\resources\mf-layer.xml but "acting" shortcut is from defaults\src\org\netbeans\modules\defaults\mf-layer.xml. If I change shortcut in Options, it starts to behave consistently. I guess it must be fixed in defaults\mf-layer.xml. But Maxi, Vito is there a way to prevent such clashes?
Returning back - I'm not aware about any bug in debugger modules. I doubt that the problem is in defaults/src/org/netbeans/modules/defaults/mf-layer.xml - This was the first place I've looked at and the last change there was on Jun 13. AFAIK it worked fine at that time! Ctrl+F5, D-F5.shadow is *CORRECT* for Debug Main Project in NetBeans!! Since there is a correct shortcut, can you please explain why do we see F5 there?
Then the problem is in spi.debugger.ui\src\org\netbeans\modules\debugger\resources\mf-layer.xml <folder name="Shortcuts"> <file name="F5.shadow"> <attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-DebugMainProjectAction.instance"/> </file> <file name="D-F5.shadow"> <attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-ContinueAction.instance"/> </file>
Please note that the latest modification of this part of that file was done on Jun 16 2007! So do not tell me that there is a problem. The shortcuts work fine in 6.7.1 and they also worked fine ~month ago in 6.8. So what if you find out how who screwed things up? I'm sure there was no related change in debugger.
I am sorry I was confused by different definition of shortcuts in two mentioned layers. The regression was caused by fixing issue 152576 (http://hg.netbeans.org/main-golden/rev/89657b845762).
The root problem is indeed the useless and conflicting definitions in spi.debugger.ui, which should be deleted. I will work on making ValidateLayerConsistencyTest detect this kind of misconfiguration. As to the incorrect resolution of the conflict from the standpoint of accelerators, that is easy enough to fix: core-main #587a2df3e762
I was really not willing to search for the root of the problem, since the bug is evidently in the keymap support! Keymap options present *DIFFERENT* shortcuts from what I see in menus. If keymaps are taken from module's layers I do not understand why we have NetBeans profile in defaults/mf-layer.xml. Someone who messed this up should make it clear!
To clarify what I wrote before: Keymaps/<current>/ does override Shortcuts/ as always. There was a bug (introduced by fix of #152576) that this override was not reflected in the accelerator displayed in the menu item / toolbar button (as opposed to actual accelerator used by the keystroke processor and shown in Options); now fixed in #587a2df3e762. The issue remains that the debugger module registers Shortcuts/ bindings which are (1) useless (overridden in every keymap), (2) inconsistent with the standard "NetBeans" keymap binding. Whoever swapped F5 and C-F5 failed to do it across the board. I am working on writing a test for this kind of situation as well as correcting it for the specific case of the debugger.
So if it's O.K. to delete all shortcuts from spi.debugger.ui/src/org/netbeans/modules/debugger/resources/mf-layer.xml, I'll happily do it. I wonder why it was not deleted with introduction of NetBeans profile in keymaps.
I will take care of the incorrect shortcuts in spi.debugger.ui. Still working on writing a test which accurately captures the problem and checking whether there are other similar cases. As to why the base shortcut definitions were not removed when the keymaps were introduced, I am not sure. Perhaps an oversight.
In core-main #e23414da833c I am removing those bindings in Shortcuts which are anyway made (possibly via different keystrokes) in every keymap, since these are almost certainly superfluous. I am leaving alone those Shortcuts bindings for which at least one keymap lacks a definition, as with that keymap active you would otherwise have no shortcut for the action at all, which could be a regression (though in some cases it is likely that the omission of the action from a nondefault keymap is simply an oversight). The situation is necessarily messy because there is a longstanding conflict between modularity on the one hand - keeping UI definitions as close to the implementing code as possible - and the desire to centralize keymap definitions. Perhaps a better system would involve deleting the explicit NetBeans keymap, moving all its bindings to Shortcuts in the implementing module, and permitting nondefault keymaps to mask default bindings using _hidden files or add new bindings but otherwise inheriting from the default keymap. This would be some work, though, and there is a risk of incompatibility for users with customized keymaps.
Integrated into 'main-golden', will be available in build *200909021401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/587a2df3e762 User: Jesse Glick <jglick@netbeans.org> Log: #170677: if a keymap overrides the base shortcut definition, always use its accelerator, regardless of the usual ordering.