mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-88106 Auto-completion works incorrectly when I make and then fix a mistake
This commit is contained in:
@@ -1272,4 +1272,22 @@ class Foo {
|
||||
myFixture.checkResult 'class Foo {{ boolean <caret> }}'
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
public void testBackspaceShouldShowPreviousVariants() {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
|
||||
myFixture.addClass("class OuterX { static class TrueLine {} }")
|
||||
myFixture.configureByText 'a.java', 'class Foo{ void foo(int truex) { return tr<caret> }}'
|
||||
type 'ue'
|
||||
assert myFixture.lookupElementStrings == ['true', 'truex']
|
||||
type 'l'
|
||||
assert myFixture.lookupElementStrings == ['TrueLine']
|
||||
type '\b'
|
||||
assert myFixture.lookupElementStrings == ['true', 'truex']
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class CompletionTestCase extends DaemonAnalyzerTestCase {
|
||||
}
|
||||
|
||||
protected void complete(final int time) {
|
||||
new CodeCompletionHandlerBase(myType).invokeCompletion(myProject, myEditor, time, false);
|
||||
new CodeCompletionHandlerBase(myType).invokeCompletion(myProject, myEditor, time);
|
||||
|
||||
LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myEditor);
|
||||
myItems = lookup == null ? null : lookup.getItems().toArray(new LookupElement[lookup.getItems().size()]);
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public abstract class LightCompletionTestCase extends LightCodeInsightTestCase {
|
||||
}
|
||||
|
||||
protected void complete(final int time) {
|
||||
new CodeCompletionHandlerBase(myType).invokeCompletion(getProject(), getEditor(), time, false);
|
||||
new CodeCompletionHandlerBase(myType).invokeCompletion(getProject(), getEditor(), time);
|
||||
|
||||
LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myEditor);
|
||||
myItems = lookup == null ? null : lookup.getItems().toArray(LookupElement.EMPTY_ARRAY);
|
||||
|
||||
Reference in New Issue
Block a user