From b59d3db9bf122ffecb39fed9bfe2e7600c593c9c Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 28 Nov 2014 15:16:35 +0100 Subject: [PATCH 1/4] use CommonShortcuts --- .../src/com/intellij/ui/AbstractFieldPanel.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/AbstractFieldPanel.java b/platform/platform-api/src/com/intellij/ui/AbstractFieldPanel.java index 60309cee6bfe..8a81e8b85da4 100644 --- a/platform/platform-api/src/com/intellij/ui/AbstractFieldPanel.java +++ b/platform/platform-api/src/com/intellij/ui/AbstractFieldPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package com.intellij.ui; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CustomShortcutSet; +import com.intellij.openapi.actionSystem.CommonShortcuts; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.FixedSizeButton; @@ -30,7 +30,6 @@ import javax.swing.event.DocumentEvent; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; import java.util.ArrayList; /** @@ -204,7 +203,7 @@ public abstract class AbstractFieldPanel extends JPanel { public void actionPerformed(AnActionEvent e) { doOKAction(); } - }.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)), myTextArea); + }.registerCustomShortcutSet(CommonShortcuts.ENTER, myTextArea); return ScrollPaneFactory.createScrollPane(myTextArea); } From 2d6aa5857ce326a61a3908343ff2eb5e63e20614 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 28 Nov 2014 15:17:14 +0100 Subject: [PATCH 2/4] use CommonShortcuts --- .../xdebugger/impl/breakpoints/ui/BreakpointsDialog.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointsDialog.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointsDialog.java index 549149ff952f..5f628bd48763 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointsDialog.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointsDialog.java @@ -52,7 +52,6 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; -import java.awt.event.KeyEvent; import java.util.*; import java.util.List; @@ -272,7 +271,7 @@ public class BreakpointsDialog extends DialogWrapper { navigate(true); close(OK_EXIT_CODE); } - }.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)), tree); + }.registerCustomShortcutSet(CommonShortcuts.ENTER, tree); new AnAction("BreakpointDialog.ShowSource") { @Override From db7f1ee5ba9eda5721a85467ffe8d7d50d8a6bd5 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 28 Nov 2014 15:18:01 +0100 Subject: [PATCH 3/4] use CommonShortcuts.ENTER --- .../src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java index 8420102220df..92f04fc804ec 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeymapPanel.java @@ -349,7 +349,7 @@ public class KeymapPanel extends JPanel implements SearchableConfigurable, Confi group.add(new AnAction("Edit Shortcut", "Edit Shortcut", AllIcons.ToolbarDecorator.Edit) { { - registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)), myActionsTree.getTree()); + registerCustomShortcutSet(CommonShortcuts.ENTER, myActionsTree.getTree()); } @Override From 5b27e3c5eeb463bb263fe33e3d9e3cd649a0ef3b Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 28 Nov 2014 15:18:45 +0100 Subject: [PATCH 4/4] use CommonShortcuts --- .../com/intellij/ui/popup/util/MasterDetailPopupBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ui/popup/util/MasterDetailPopupBuilder.java b/platform/lang-impl/src/com/intellij/ui/popup/util/MasterDetailPopupBuilder.java index c3f71bd8103b..984b512fb254 100644 --- a/platform/lang-impl/src/com/intellij/ui/popup/util/MasterDetailPopupBuilder.java +++ b/platform/lang-impl/src/com/intellij/ui/popup/util/MasterDetailPopupBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -380,7 +380,7 @@ public class MasterDetailPopupBuilder implements MasterController { public void actionPerformed(AnActionEvent e) { chooseItemWithEnterOrDoubleClick(); } - }.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)), list); + }.registerCustomShortcutSet(CommonShortcuts.ENTER, list); new AnAction() { @Override public void actionPerformed(AnActionEvent e) {