mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
first letter shouldn't oblige to use humps everywhere
This commit is contained in:
@@ -228,7 +228,8 @@ public class NameUtilTest extends UsefulTestCase {
|
||||
|
||||
public void testFileStructure() {
|
||||
assertDoesntMatch("hint", "height: int");
|
||||
assertDoesntMatch("Hint", "Height:int");
|
||||
assertMatches("Hint", "Height:int");
|
||||
assertDoesntMatch("Hint", "Height: int");
|
||||
|
||||
assertMatches("getColor", "getBackground(): Color");
|
||||
assertMatches("get color", "getBackground(): Color");
|
||||
@@ -344,6 +345,8 @@ public class NameUtilTest extends UsefulTestCase {
|
||||
assertMatches("WebLOgic", "WebLogic");
|
||||
assertMatches("WEbLogic", "WebLogic");
|
||||
assertDoesntMatch("WebLogic", "Webologic");
|
||||
|
||||
assertMatches("Wlo", "WebLogic");
|
||||
}
|
||||
|
||||
public void testFinalSpace() {
|
||||
|
||||
@@ -38,9 +38,9 @@ public class MinusculeMatcher implements Matcher {
|
||||
public MinusculeMatcher(String pattern, NameUtil.MatchingCaseSensitivity options) {
|
||||
myOptions = options;
|
||||
myPattern = StringUtil.trimEnd(pattern, "* ").toCharArray();
|
||||
for (int i = 0; i < myPattern.length; i++) {
|
||||
for (int i = 1; i < myPattern.length; i++) {
|
||||
char c = myPattern[i];
|
||||
if (Character.isUpperCase(c) && (i > 0 || myOptions != FIRST_LETTER)) {
|
||||
if (Character.isUpperCase(c)) {
|
||||
myHasHumps = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user