support hippie completion at the file start (EA-52100)

This commit is contained in:
peter
2013-11-21 17:46:21 +01:00
parent 67291898d6
commit 3334c0b2b7
2 changed files with 14 additions and 1 deletions
@@ -128,6 +128,19 @@ class Xoo {
}
public void "test file start"() {
myFixture.configureByText "a.java", '''<caret>
class Xoo {
}
'''
complete()
myFixture.checkResult '''class<caret>
class Xoo {
}
'''
}
private void complete() {
myFixture.performEditorAction(IdeActions.ACTION_HIPPIE_COMPLETION)
}
@@ -305,7 +305,7 @@ public class HippieWordCompletionHandler implements CodeInsightActionHandler {
final CompletionData data = new CompletionData();
processWords(editor, offset - 1, new TokenProcessor() {
processWords(editor, Math.max(offset - 1, 0), new TokenProcessor() {
@Override
public boolean processToken(int start, int end) {
if (start > offset) {