mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
more diagnostics for the test
This commit is contained in:
@@ -68,6 +68,8 @@ class JavaAutoPopupTest extends CompletionAutoPopupTestCase {
|
||||
assertOrderedEquals myFixture.lookupElementStrings, "itaa", "iterable"
|
||||
type "e"
|
||||
assertOrderedEquals myFixture.lookupElementStrings, "iterable"
|
||||
|
||||
println "typing r"
|
||||
type "r"
|
||||
assertOrderedEquals myFixture.lookupElementStrings, "iter", "iterable"
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.codeInsight.completion.impl.CompletionServiceImpl;
|
||||
import com.intellij.codeInsight.editorActions.CompletionAutoPopupHandler;
|
||||
import com.intellij.codeInsight.lookup.LookupAdapter;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInsight.lookup.LookupEvent;
|
||||
@@ -617,10 +618,17 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
return;
|
||||
}
|
||||
|
||||
if (CompletionAutoPopupHandler.ourTestingAutopopup) {
|
||||
System.out.println("CompletionProgressIndicator.prefixUpdated");
|
||||
}
|
||||
|
||||
final CharSequence text = myEditor.getDocument().getCharsSequence();
|
||||
final int caretOffset = myEditor.getCaretModel().getOffset();
|
||||
for (Pair<Integer, ElementPattern<String>> pair : myRestartingPrefixConditions) {
|
||||
final String newPrefix = text.subSequence(pair.first, caretOffset).toString();
|
||||
if (CompletionAutoPopupHandler.ourTestingAutopopup) {
|
||||
System.out.println("newPrefix = " + newPrefix);
|
||||
}
|
||||
if (pair.second.accepts(newPrefix)) {
|
||||
scheduleRestart();
|
||||
myRestartingPrefixConditions.clear();
|
||||
@@ -632,6 +640,11 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
}
|
||||
|
||||
public void scheduleRestart() {
|
||||
if (CompletionAutoPopupHandler.ourTestingAutopopup) {
|
||||
System.out.println("CompletionProgressIndicator.scheduleRestart");
|
||||
}
|
||||
|
||||
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
|
||||
final int offset = myEditor.getCaretModel().getOffset();
|
||||
@@ -641,7 +654,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
if (CompletionAutoPopupHandler.ourTestingAutopopup) {
|
||||
System.out.println("later");
|
||||
}
|
||||
|
||||
@@ -657,7 +670,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
return;
|
||||
}
|
||||
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
if (CompletionAutoPopupHandler.ourTestingAutopopup) {
|
||||
System.out.println("invoking");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user