mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-137120 AutoComplete does not offer options, there is a word begins with an underscore
This commit is contained in:
@@ -280,6 +280,7 @@ public class NameUtilMatchingTest extends UsefulTestCase {
|
||||
assertMatches("*_dark", "collapseAll_dark.png");
|
||||
assertMatches("*_dark.png", "collapseAll_dark.png");
|
||||
assertMatches("**_dark.png", "collapseAll_dark.png");
|
||||
assertTrue(firstLetterMatcher("*_DARK").matches("A_DARK.png"));
|
||||
}
|
||||
|
||||
public void testMiddleMatching() {
|
||||
|
||||
@@ -410,13 +410,18 @@ public class MinusculeMatcher implements Matcher {
|
||||
if (!charEquals(patternChar, patternIndex, name.charAt(nameIndex), ignoreCase)) return false;
|
||||
|
||||
if (myOptions == NameUtil.MatchingCaseSensitivity.FIRST_LETTER &&
|
||||
(patternIndex == 0 || patternIndex == 1 && isWildcard(0)) &&
|
||||
(patternIndex == 0 || patternIndex == 1 && isWildcard(0)) &&
|
||||
hasCase(patternChar) &&
|
||||
Character.isUpperCase(patternChar) != Character.isUpperCase(name.charAt(0))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean hasCase(char patternChar) {
|
||||
return Character.isUpperCase(patternChar) || Character.isLowerCase(patternChar);
|
||||
}
|
||||
|
||||
private boolean isWildcard(int patternIndex) {
|
||||
if (patternIndex >= 0 && patternIndex < myPattern.length) {
|
||||
char pc = myPattern[patternIndex];
|
||||
|
||||
Reference in New Issue
Block a user