Smart Introduce plugin makes shortcut key doesn't work well

When I open Data Source dialog via menu Tools | Data Sources... by Alt + T then S, IDEA opens Search menu. The reason is "Data Source..." menu and "Smart Introduce Plugin" menu use same short cut key "S".

5 comments

I've removed the shortcut, but in fact I'd say it's an issue with IDEA if it allows a plugin to
register a conflicting mnemonic.

Sascha

0

I'd say it's an issue with IDEA if it allows a plugin to
register a conflicting mnemonic.


With customizations, any menu item can go anywhere, it would be pretty hard to check.

Bas

0

Hello Bas,

>> I'd say it's an issue with IDEA if it allows a plugin to
>> register a conflicting mnemonic.


With customizations, any menu item can go anywhere, it would be pretty hard to check.


Shouldn't this even more encourage IDEA not to display conflicting mnemonics? It should actually
be quite easy to drop a shortcut when it's already in use by another menu item/action in the same menu.

Sascha

0

Hello Sascha,

>>> I'd say it's an issue with IDEA if it allows a plugin to register a
>>> conflicting mnemonic.
>>>
>> With customizations, any menu item can go anywhere, it would be
>> pretty hard to check.
>>

Shouldn't this even more encourage IDEA not to display conflicting
mnemonics? It should actually

be quite easy to drop a shortcut when it's already in use by another
menu item/action in the same menu.


Actually Swing handles conflicting shortcuts quite well - it selects the
first of the conflicting menu items on first press, the second one on the
second press and so on. I think that works better than dropping the conflicting
shortcuts altogether.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Hello Dmitry,

Actually Swing handles conflicting shortcuts quite well - it selects the
first of the conflicting menu items on first press, the second one on
the second press and so on. I think that works better than dropping the
conflicting shortcuts altogether.


Ah, OK, I didn't know that. But it does not work correctly in this actual case when there's a menu
(_Search) and two entries in another menu with the same mnemonic (Tools -> Data _Sources, Tools ->
_SmartIntroduce): Pressing "s" when the Tools-Menu is open switches to the Search-Menu. It works
fine when there's a "conflict" between a menu and a single item: _Edit vs. Tools -> _Edit Macros.

This seems to be a Swing-bug then, but I agree that it doesn't necessarily needs to be dealt with in
IDEA.

Sascha

0

Please sign in to leave a comment.