add '>' and ':' to allowed symbols in SpeedSearch (e.g.: filter method refs or lambdas in show implementation)

This commit is contained in:
Dmitry Batkovich
2016-10-27 10:44:41 +03:00
parent 4901e1fc85
commit b61abb91e0
@@ -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();
}