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 241983 - Duplicate Shortcut is not called out when adding alternative shortcut key
Summary: Duplicate Shortcut is not called out when adding alternative shortcut key
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on: 236458
Blocks:
  Show dependency tree
 
Reported: 2014-02-17 07:35 UTC by rashmidixit
Modified: 2015-05-19 11:54 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Alternative shortcut not suggested correctly (68.15 KB, image/png)
2014-02-17 07:35 UTC, rashmidixit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rashmidixit 2014-02-17 07:35:35 UTC
Created attachment 145285 [details]
Alternative shortcut not suggested correctly

When I add an alternative shortcut, the shortcuts which are already used are not called out in the call out displayed below. However, such an alternative shortcut is not assigned at all to the new action

Steps to reproduce:

Try to add alternative key CTRL+M to Cut action. It says that there is is not used anywhere else. See attached picture

Build NetBeans Dev 201402130001
Comment 1 rashmidixit 2014-02-17 07:37:57 UTC
Note that before I click on OK, if I happen to click elsewhere, then the "Conflicting Dialog Box" appears to tell me that there is another place where this key is used. However, if I directly click OK, then this doesnt show up.
Comment 2 Jiri Prox 2014-02-17 07:40:52 UTC
reproducible,  
nice catch, thanks
Comment 3 Svata Dedic 2014-02-18 14:13:34 UTC
Sadly a known bug; because of OK handling in options, I don't get the event early enough to prevent dialog close - see issue #236458.

Please always press ENTER when editing shortcut line
Comment 4 Svata Dedic 2015-05-19 11:54:32 UTC
Moving to platform. During apply/OK handling, the individual Panels have no chance to react and invalidate themselves - e.g. in this situation, where the user entry is validated upon field exit. There are other situation which demand that the user input is validated only after completion (moving off text field, closing a choice box...).

The execution sequence should permit the panels to complete field validation, possibly raising an invalid flag, which should then interrupt the apply process.

I recommend:
* postpone the actual dialog close (enqueue an event in EDT), which allows the current queued event to complete and possibly raise the flag
* check validity of the dialogs
* only if everything is still OK, close the dialog or apply changes.