mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
honor completion-case-sensitive=ALL option in the new matcher
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
{
|
||||
Object classLOSomething;
|
||||
Object classLoader;
|
||||
Object classLoader2;
|
||||
cLo<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -5,6 +5,7 @@
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.codeInsight.CodeInsightSettings;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInsight.lookup.impl.LookupImpl;
|
||||
import com.intellij.psi.PsiClass;
|
||||
@@ -59,6 +60,17 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
assertPreferredItems(0, "p", "pre", "param");
|
||||
}
|
||||
|
||||
public void testUppercaseMatters2() throws Throwable {
|
||||
final int old = CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE;
|
||||
try {
|
||||
CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = CodeInsightSettings.ALL;
|
||||
checkPreferredItems(0, "classLoader", "classLoader2");
|
||||
}
|
||||
finally {
|
||||
CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE = old;
|
||||
}
|
||||
}
|
||||
|
||||
public void testShorterShouldBePreselected() throws Throwable {
|
||||
checkPreferredItems(0, "foo", "fooLongButOfDefaultType");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user