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.
Summary: | Output Window keybindings not customizable or synchronized with others | ||
---|---|---|---|
Product: | platform | Reporter: | sviyer <sviyer> |
Component: | Output Window | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | arittner, holub, jglick, psomol, sdedic, theofanis |
Priority: | P3 | Keywords: | PLAN |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 211167 | ||
Attachments: |
Patch
Patch Patch |
Description
sviyer
2005-04-20 23:34:14 UTC
Reassigned from ide issues to core->output. Feel free to reassign. accepting, this ought to be fixed. I suppose it's not the case for find only, but also find next, copy, close, save as. *** Issue 68937 has been marked as a duplicate of this issue. *** to allow user changes of output window shortcuts is not likely fixable in 5.0 timeframe, requires a complete rewrite of the action support in the output window. Reassigning to new module owner Tomas Holy. *** Bug 188486 has been marked as a duplicate of this bug. *** Created attachment 118047 [details]
Patch
A patch with fix attached. Keymap Options API is now used to retrieve shortcuts for editor actions that can be reused in output window (Find, Find Next, Copy, Paste, Select all, ...) and to create a new KeymapManager. Jesse, Fanis, please, is this solution correct? It is quite complicated, but I couldn’t find any better way to reuse shortcuts already defined for editor actions. Fanis, can I please add a new friend module to Keymap Options API? Petr, can you please approve this UI change? Several hard-coded key shortcuts are now customizable in Tools -> Options -> Keymap, category Output Window. Default shortcuts for new keymap actions are equal to formerly hard-coded shortcuts. I do not know much about options.keymap and editor keybindings in general; you need a review from someone on the editor team. The proposed patch does feel too complicated, especially the copying of editor.settings.storage.spi.support.StorageSupport. Possibly we need a generalized version of options.keymap which is designed to manage keybindings from multiple types of windows; currently there are just two kinds of bindings: global and editor. I doubt this is a candidate for fixing in 7.2 past feature freeze. *** Bug 166545 has been marked as a duplicate of this bug. *** Re. storage - this is 3rd form :) in addition to .instance file-based (layer provider), and editor's keybinding XML configurations. Maybe it's really time to unify those in the keymap module. There could be other users as well (navigator, and even popup windows like call hierarchy). re. the patch [SD01] since it's the ShortcutsFinder implementation which uses "nice" string representation for shortcut (unlike Utilities.keyToString), I would be in favour to make a supplemental interface in keymap.options that would map String[] to KeyStroke[] - implementation is already in keymap options module & output tab could use it. Thank you for your comments. > I doubt this is a candidate for fixing in 7.2 past feature freeze. I'll postpone fixing it. > Maybe it's really time to unify those in the keymap module I think this module is quite a good place, as it can easily provide custom shortcuts for currently selected keymap profile. > I would be in favour to make a supplemental interface in keymap.options that > would map String[] to KeyStroke[] I agree. I would also like to have a standard way to select the most appropriate shortcut to be shown in menus (e.g. not to show FIND key on platforms where FIND key is not usually present, but to show Ctrl+F alternative shortcut instead). Created attachment 122839 [details]
Patch
Updated Patch
Class org.netbeans.modules.options.keymap.Utils (private) renamed to
org.netbeans.core.options.keymap.api.KeyStrokeUtils (friend private).
Added method getKeyStrokesForAction.
There is also new method refreshActionCache and some changes in KeymapViewModel. Without these changes, outdated keystrokes are returned. It is a bad practice to refresh actions before reading keystrokes, but I was not able to find a better way to retrieve current data. Please, do you have some idea how to fix this?
Svata, could you please review the changes?
Created attachment 123704 [details]
Patch
Patch updated (after discussion with Svata):
- Added Common Annotations for methods in KeyStrokeUtils
- Code Style improved
- GetKeyStrokesForAction supports multi-key shortcuts (return list of arrays)
- Added a test case
Unless there are any other problems, I'll integrate it tomorrow afternoon.
Thank you.
OK, thanks! Patch integrated as http://hg.netbeans.org/core-main/rev/06006afbe7cf Integrated into 'main-golden', will be available in build *201209010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/06006afbe7cf User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #58126: Output Window keybindings not customizable or synchronized with others Integrated into 'main-golden', will be available in build *201209040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cf2079346a97 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #58126: Fixing specification version |