mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't skip digits in the beginning
This commit is contained in:
@@ -123,6 +123,13 @@ public class NameUtilTest extends UsefulTestCase {
|
||||
assertTrue(NameUtil.buildCompletionMatcher(" us", 0, true, true).matches("getMyUsage"));
|
||||
}
|
||||
|
||||
public void testStartDot() {
|
||||
assertMatches("A*.html", "A.html");
|
||||
assertMatches("A*.html", "Abc.html");
|
||||
assertMatches("A*.html", "after.html");
|
||||
assertDoesntMatch("A*.html", "10_after.html");
|
||||
}
|
||||
|
||||
public void testIDEADEV15503() throws Exception {
|
||||
assertMatches("AR.jsp", "add_relationship.jsp");
|
||||
assertMatches("AR.jsp", "advanced_rule.jsp");
|
||||
|
||||
@@ -449,7 +449,7 @@ public class NameUtil {
|
||||
}
|
||||
|
||||
if (StringUtil.toLowerCase(name.charAt(nameIndex)) != StringUtil.toLowerCase(myPattern[patternIndex])) {
|
||||
if (Character.isDigit(name.charAt(nameIndex)) || (name.charAt(nameIndex) == '.' && name.indexOf('.', nameIndex + 1) > 0)) {
|
||||
if (Character.isDigit(name.charAt(nameIndex)) && nameIndex > 0 || (name.charAt(nameIndex) == '.' && name.indexOf('.', nameIndex + 1) > 0)) {
|
||||
return matchName(name, patternIndex, nameIndex + 1);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user