middle matching with one char prefix

This commit is contained in:
peter
2012-08-29 13:47:44 +02:00
parent 5655c96aae
commit a3291b8b2e
4 changed files with 7 additions and 5 deletions
@@ -54,7 +54,7 @@ public class JavadocCompletionTest extends LightFixtureCompletionTestCase {
public void testNamesInMethod1() throws Exception {
configureByFile("MethodTagName1.java");
assertStringItems("see", "serialData", "since");
assertStringItems("see", "serialData", "since", "class", "throws");
}
public void testParamValueCompletion() throws Exception {
@@ -450,7 +450,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
public void testNoUninitializedFieldsInConstructor() throws Throwable {
configureByTestName();
assertStringItems("aac", "aab");
assertStringItems("aac", "aab", "hashCode");
}
public void testFieldsSetInAnotherConstructor() throws Throwable { doTest(); }
public void testFieldsSetAbove() throws Throwable { doTest(); }
@@ -471,7 +471,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
public void testVoidExpectedType() throws Throwable {
configureByTestName();
assertStringItems("notify", "notifyAll", "wait", "wait", "wait", "getClass", "equals", "hashCode", "toString");
type('e');
type("eq");
assertEquals("equals", assertOneElement(getLookup().getItems()).getLookupString());
select();
checkResultByTestName();
@@ -252,7 +252,9 @@ public class NameUtilTest extends UsefulTestCase {
assertMatches("*f", "format");
assertMatches("*f", "Format");
assertMatches("*Stri", "string");
assertDoesntMatch("*f", "reformat");
assertMatches("*f", "reformat");
assertMatches("*f", "reformatCode");
assertDoesntMatch("*fc", "reformatCode");
assertDoesntMatch("*sTC", "LazyClassTypeConstructor");
}
@@ -211,7 +211,7 @@ public class MinusculeMatcher implements Matcher {
}
if (patternIndex + i >= myPattern.length) {
return i >= minFragment ? FList.<TextRange>emptyList().prepend(TextRange.from(nameIndex, i)) : null;
return FList.<TextRange>emptyList().prepend(TextRange.from(nameIndex, i));
}
while (i >= minFragment) {
int nextWordStart;