mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
prefer variants without leading underscores when case sensitivity=first letter (OC-3547)
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
class Zoo {
|
||||
void zoo(String fooBar, String __FOO_BAR) {
|
||||
foo<caret>
|
||||
}
|
||||
}
|
||||
+4
@@ -460,6 +460,10 @@ interface TxANotAnno {}
|
||||
checkPreferredItems(0, 'fooBar', '_fooBar', 'FooBar')
|
||||
}
|
||||
|
||||
public void testDispreferUnderscoredCaseMismatch() {
|
||||
checkPreferredItems(0, 'fooBar', '__FOO_BAR')
|
||||
}
|
||||
|
||||
public void testStatisticsMattersOnNextCompletion() {
|
||||
configureByFile(getTestName(false) + ".java")
|
||||
myFixture.completeBasic();
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ public class CamelHumpMatcher extends PrefixMatcher {
|
||||
int matchStart = ranges.get(0).getStartOffset();
|
||||
int underscoreEnd = skipUnderscores(string);
|
||||
if (matchStart > 0 && matchStart <= underscoreEnd) {
|
||||
return myMatcher.matchingDegree(string.substring(matchStart)) - 1;
|
||||
return myCaseInsensitiveMatcher.matchingDegree(string.substring(matchStart)) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user