mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-80750 - assert: AnAction.setShortcutSet
before this fix, it worked only for the first search field in IDE, because after the first time the shortcut is no longer empty (we registered it), and action was not registered on component any more.
This commit is contained in:
@@ -18,7 +18,6 @@ package com.intellij.ui;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.CommonShortcuts;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.ui.JBMenuItem;
|
||||
@@ -204,9 +203,7 @@ public class SearchTextField extends JPanel {
|
||||
final ActionManager actionManager = ActionManager.getInstance();
|
||||
if (actionManager != null) {
|
||||
final AnAction clearTextAction = actionManager.getAction(IdeActions.ACTION_CLEAR_TEXT);
|
||||
if (clearTextAction.getShortcutSet().getShortcuts().length == 0) {
|
||||
clearTextAction.registerCustomShortcutSet(CommonShortcuts.ESCAPE, this);
|
||||
}
|
||||
clearTextAction.registerCustomShortcutSet(clearTextAction.getShortcutSet(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<action id="FullyExpandTreeNode">
|
||||
<keyboard-shortcut first-keystroke="MULTIPLY"/>
|
||||
</action>
|
||||
<!--<action id="TextComponent.ClearAction">
|
||||
<action id="TextComponent.ClearAction">
|
||||
<keyboard-shortcut first-keystroke="ESCAPE"/>
|
||||
</action>-->
|
||||
</action>
|
||||
<action id="ExpandTreeNode">
|
||||
<keyboard-shortcut first-keystroke="ADD"/>
|
||||
</action>
|
||||
|
||||
Reference in New Issue
Block a user