mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
support hippie completion at the file start (EA-52100)
This commit is contained in:
+13
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user