Community
Participate
Working Groups
I20100831-1001, follow-up to bug 319560 The behavior of the Find/Replace dialog is nice when I press one of the push button mnemonics. A similar behavior would also be helpful for the other (checkbox and radio) buttons. I often start typing a pattern and then have to switch the Regex checkbox. After that, the focus is gone and I have to put it back the find field. Request: If (and only if) the focus is in one of the text fields, a mnemonic press should keep the focus in the text field (but still execute the mnemonic).
Created attachment 178707 [details] Patch
Thanks, committed to HEAD with a bugfix and a few nitpicks: - added "&& button.isEnabled()" to the traverse listener (in regex mode, some buttons are disabled) - "(button.getStyle() & SWT.PUSH) == SWT.PUSH" should be written as "(button.getStyle() & SWT.PUSH) != 0" (shorter, removes redundancy). - if-else clauses should be written with either blocks or with no blocks (no mixing) - replaced "a map" with "{@link #fMnemonicButtonMap}"
Verified for 3.7M2 on Linux with I20100914-0100.