apply statistics from previous completion when starting new completion

This commit is contained in:
peter
2012-07-09 19:09:35 +02:00
parent e88c0d6adf
commit d14fdb54b4
3 changed files with 932 additions and 911 deletions
@@ -0,0 +1,8 @@
class JComponent {}
class JComboBox {}
class FooBar {
void foo() {
JCom<caret>
}
}
@@ -394,4 +394,15 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
checkPreferredItems(0, '_fooBar', 'FooBar')
}
public void testStatisticsMattersOnNextCompletion() {
configureByFile(getTestName(false) + ".java")
myFixture.completeBasic();
assert lookup
assert lookup.currentItem.lookupString != 'JComponent'
myFixture.type('ponent c;\nJCom')
myFixture.completeBasic();
assert lookup
assert lookup.currentItem.lookupString == 'JComponent'
}
}