diff --git a/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java b/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java index b55887c0c43d..74a2412a81d0 100644 --- a/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/commander/CommanderPanel.java @@ -139,20 +139,6 @@ public class CommanderPanel extends JPanel { }); } - myList.addKeyListener(new KeyAdapter() { - public void keyPressed(final KeyEvent e) { - if (KeyEvent.VK_ESCAPE == e.getKeyCode()) { - if (e.isConsumed()) return; - final PsiCopyPasteManager copyPasteManager = PsiCopyPasteManager.getInstance(); - final boolean[] isCopied = new boolean[1]; - if (copyPasteManager.getElements(isCopied) != null && !isCopied[0]) { - copyPasteManager.clear(); - e.consume(); - } - } - } - }); - myList.addFocusListener(new FocusAdapter() { public void focusGained(final FocusEvent e) { setActive(true); diff --git a/plugins/commander/src/com/intellij/ide/commander/Commander.java b/plugins/commander/src/com/intellij/ide/commander/Commander.java index 2497cbbf870f..70b1e21b8408 100644 --- a/plugins/commander/src/com/intellij/ide/commander/Commander.java +++ b/plugins/commander/src/com/intellij/ide/commander/Commander.java @@ -1,5 +1,6 @@ package com.intellij.ide.commander; +import com.intellij.ide.PsiCopyPasteManager; import com.intellij.ide.TwoPaneIdeView; import com.intellij.ide.projectView.ProjectViewNode; import com.intellij.ide.projectView.impl.AbstractProjectTreeStructure; @@ -39,9 +40,7 @@ import javax.swing.event.ListDataListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; +import java.awt.event.*; import java.util.ArrayList; /** @@ -299,6 +298,22 @@ public class Commander extends JPanel implements PersistentStateComponent