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) { 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); } 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 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