mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-87886 When using speed search in Run... popup, 'Backspace' deletes configurations, not the test
This commit is contained in:
+9
-1
@@ -38,6 +38,7 @@ import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
|
||||
import com.intellij.openapi.wm.ToolWindowId;
|
||||
import com.intellij.ui.popup.list.ListPopupImpl;
|
||||
import com.intellij.ui.popup.list.PopupListElementRenderer;
|
||||
import com.intellij.ui.speedSearch.SpeedSearch;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -163,7 +164,14 @@ public class ChooseRunConfigurationAction extends AnAction {
|
||||
|
||||
popup.registerAction("deleteConfiguration_bksp", KeyStroke.getKeyStroke("BACK_SPACE"), new AbstractAction() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
popup.removeSelected();
|
||||
SpeedSearch speedSearch = popup.getSpeedSearch();
|
||||
if (speedSearch.isHoldingFilter()) {
|
||||
speedSearch.backspace();
|
||||
speedSearch.update();
|
||||
}
|
||||
else {
|
||||
popup.removeSelected();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ListWithFilter<T> extends JPanel implements DataProvider {
|
||||
private class MySpeedSearch extends SpeedSearch {
|
||||
boolean searchFieldShown = false;
|
||||
|
||||
protected void update() {
|
||||
public void update() {
|
||||
mySpeedSearchPatternField.setBackground(new JTextField().getBackground());
|
||||
onSpeedSearchPatternChanged();
|
||||
mySpeedSearchPatternField.setText(getFilter());
|
||||
|
||||
@@ -68,7 +68,7 @@ public class SpeedSearch {
|
||||
}
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
public void update() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public class AbstractPopup implements JBPopup {
|
||||
protected final SpeedSearch mySpeedSearch = new SpeedSearch() {
|
||||
boolean searchFieldShown = false;
|
||||
|
||||
protected void update() {
|
||||
public void update() {
|
||||
mySpeedSearchPatternField.setBackground(new JTextField().getBackground());
|
||||
onSpeedSearchPatternChanged();
|
||||
mySpeedSearchPatternField.setText(getFilter());
|
||||
|
||||
Reference in New Issue
Block a user