Commit 306e56de authored by Mikhail Sokolov's avatar Mikhail Sokolov
Browse files

IDEA-194169 New SE: Keyboard shortcut settings

parent 855fc27b
Branches unavailable Tags unavailable
Showing with 9 additions and 5 deletions
+9 -5
......@@ -27,7 +27,6 @@ public class SetShortcutAction extends AnAction implements DumbAware {
if (seDialog == null) {
return;
}
seDialog.cancel();
KeymapManager km = KeymapManager.getInstance();
Keymap activeKeymap = km != null ? km.getActiveKeymap() : null;
......@@ -41,6 +40,7 @@ public class SetShortcutAction extends AnAction implements DumbAware {
return;
}
seDialog.cancel();
String id = ActionManager.getInstance().getId(action);
KeymapPanel.addKeyboardShortcut(id, ActionShortcutRestrictions.getInstance().getForActionId(id), activeKeymap, component);
}
......@@ -56,6 +56,13 @@ public class SetShortcutAction extends AnAction implements DumbAware {
return;
}
KeymapManager km = KeymapManager.getInstance();
Keymap activeKeymap = km != null ? km.getActiveKeymap() : null;
if (activeKeymap == null) {
presentation.setEnabled(false);
return;
}
AnAction action = e.getData(SELECTED_ACTION);
Component component = e.getData(PlatformDataKeys.CONTEXT_COMPONENT);
presentation.setEnabled(action != null && component != null);
......
......@@ -896,9 +896,6 @@
<action id="MarkNotificationsAsRead" class="com.intellij.notification.impl.actions.MarkAllNotificationsAsReadAction"/>
<action class="com.intellij.ide.actions.SelectInProjectViewAction" id="SelectInProjectView" text="Select in Project View" />
<action id="SetShortcutAction"
class="com.intellij.ide.actions.SetShortcutAction"
use-shortcut-of="ShowIntentionActions"
/>
<action id="SetShortcutAction" class="com.intellij.ide.actions.SetShortcutAction" use-shortcut-of="ShowIntentionActions"/>
</actions>
</idea-plugin>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment