IDEA-71249 Live template name not focused in autocompletion popup is anyway expanded

This commit is contained in:
peter
2011-06-28 16:30:54 +02:00
parent 5f387db80e
commit 6fd099ebd9
2 changed files with 17 additions and 1 deletions
@@ -819,5 +819,21 @@ public class UTest {
assert 'xxxxx.SYSTEM_EXCEPTION' == ((JavaPsiClassReferenceElement) myFixture.lookupElements[2]).qualifiedName
}
public void testTabShouldPreferLookupsToLiveTemplate() {
myFixture.configureByText "a.java", """
class LiveComplete {
public void innerThing() { }
public void context() {
<caret>
}
}
"""
type 'inn'
assert myFixture.lookupElementStrings == ['inn', 'innerThing']
edt { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_MOVE_CARET_DOWN) }
type '\t'
assert myFixture.file.text.contains("innerThing();")
}
}