From b61abb91e026a19be6e496d82d2586b9a4d303ea Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 27 Oct 2016 10:44:41 +0300 Subject: [PATCH] add '>' and ':' to allowed symbols in SpeedSearch (e.g.: filter method refs or lambdas in show implementation) --- .../src/com/intellij/ui/speedSearch/SpeedSearch.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearch.java b/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearch.java index dfc8d4b75e73..29c56b5dc39c 100644 --- a/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearch.java +++ b/platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearch.java @@ -17,11 +17,14 @@ package com.intellij.ui.speedSearch; import com.intellij.psi.codeStyle.NameUtil; import com.intellij.util.text.Matcher; +import gnu.trove.TIntHashSet; import org.jetbrains.annotations.Nullable; import java.awt.event.KeyEvent; public class SpeedSearch { + private final static TIntHashSet ALLOWED_SPECIAL_SYMBOLS = new TIntHashSet(new int [] {' ', '*', '_', '-', '"', '\'', '/', '.', '$', '>', ':'}); + private String myString = ""; private boolean myEnabled; private Matcher myMatcher; @@ -58,7 +61,7 @@ public class SpeedSearch { } else { final char ch = e.getKeyChar(); - if (Character.isLetterOrDigit(ch) || ch == ' ' || ch == '*' || ch == '_' || ch == '-' || ch == '"' || ch == '\'' || ch == '/' || ch == '.' || ch == '$') { + if (Character.isLetterOrDigit(ch) || ALLOWED_SPECIAL_SYMBOLS.contains(ch)) { type(Character.toString(ch)); e.consume(); }