mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-106583 Preselect the most relevant completion suggestion with alphabetical sorting on
This commit is contained in:
@@ -1253,6 +1253,8 @@ class Foo {
|
||||
protected void tearDown() {
|
||||
CodeInsightSettings.instance.SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = false
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER
|
||||
UISettings.getInstance().SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = false
|
||||
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
@@ -1384,4 +1386,23 @@ class ListConfigKey {
|
||||
|
||||
}
|
||||
|
||||
public void testPreselectMostRelevantInTheMiddleAlpha() {
|
||||
UISettings.getInstance().SORT_LOOKUP_ELEMENTS_LEXICOGRAPHICALLY = true;
|
||||
CodeInsightSettings.instance.SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = false
|
||||
|
||||
myFixture.configureByText 'a.java', '''
|
||||
class Foo {
|
||||
void setText() {}
|
||||
void setHorizontalText() {}
|
||||
void foo() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
}
|
||||
'''
|
||||
type 'sette'
|
||||
myFixture.assertPreferredCompletionItems 1, 'setHorizontalText', 'setText'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user