mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-142783 "*LRUMap" goto class pattern can not find SLRUMap but should
This commit is contained in:
@@ -334,6 +334,10 @@ public class NameUtilMatchingTest extends UsefulTestCase {
|
||||
assertFalse(firstLetterMatcher("*I").matches("id"));
|
||||
}
|
||||
|
||||
public void "test asterisk ending inside uppercase word"() {
|
||||
assertMatches("*LRUMap", "SLRUMap");
|
||||
}
|
||||
|
||||
public void testMiddleMatchingFirstLetterSensitive() {
|
||||
assertTrue(firstLetterMatcher(" cl").matches("getClass"));
|
||||
assertFalse(firstLetterMatcher(" EUC-").matches("x-EUC-TW"));
|
||||
|
||||
@@ -365,7 +365,7 @@ public class MinusculeMatcher implements Matcher {
|
||||
return null;
|
||||
}
|
||||
|
||||
// middle matches have to be at least of length 3, to prevent too many irrelevant matches
|
||||
// exact middle matches have to be at least of length 3, to prevent too many irrelevant matches
|
||||
int minFragment = isPatternChar(patternIndex - 1, '*') && !isWildcard(patternIndex + 1) &&
|
||||
Character.isLetterOrDigit(name.charAt(nameIndex)) && !isWordStart(name, nameIndex)
|
||||
? 3 : 1;
|
||||
@@ -375,11 +375,11 @@ public class MinusculeMatcher implements Matcher {
|
||||
patternIndex + i < myPattern.length &&
|
||||
charEquals(myPattern[patternIndex+i], patternIndex+i, name.charAt(nameIndex + i), ignoreCase)) {
|
||||
if (isUpperCase[patternIndex + i] && myHasHumps) {
|
||||
if (i < minFragment) {
|
||||
return null;
|
||||
}
|
||||
// when an uppercase pattern letter matches lowercase name letter, try to find an uppercase (better) match further in the name
|
||||
if (myPattern[patternIndex + i] != name.charAt(nameIndex + i)) {
|
||||
if (i < minFragment) {
|
||||
return null;
|
||||
}
|
||||
int nextWordStart = indexOfWordStart(name, patternIndex + i, nameIndex + i);
|
||||
FList<TextRange> ranges = matchWildcards(name, patternIndex + i, nextWordStart, matchingState);
|
||||
if (ranges != null) {
|
||||
|
||||
Reference in New Issue
Block a user