mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more diagnostics for EA-27033 (invalid caret position on completion restart)
This commit is contained in:
+1
-1
@@ -594,7 +594,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
for (Pair<Integer, ElementPattern<String>> pair : myRestartingPrefixConditions) {
|
||||
int start = pair.first;
|
||||
if (caretOffset < start) {
|
||||
LOG.error("caret=" + caretOffset + "; start=" + start);
|
||||
LOG.error("caret=" + caretOffset + "; start=" + start + "; phase=" + CompletionServiceImpl.getPhaseRaw() + "; running=" + isRunning() + "; canceled=" + isCanceled());
|
||||
}
|
||||
final String newPrefix = text.subSequence(start, caretOffset).toString();
|
||||
if (pair.second.accepts(newPrefix)) {
|
||||
|
||||
+5
-1
@@ -225,7 +225,7 @@ public class CompletionServiceImpl extends CompletionService{
|
||||
|
||||
public static CompletionPhase getCompletionPhase() {
|
||||
// ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
CompletionPhase phase = ourPhase;
|
||||
CompletionPhase phase = getPhaseRaw();
|
||||
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if (indicator != null) {
|
||||
indicator.checkCanceled();
|
||||
@@ -233,6 +233,10 @@ public class CompletionServiceImpl extends CompletionService{
|
||||
return phase;
|
||||
}
|
||||
|
||||
public static CompletionPhase getPhaseRaw() {
|
||||
return ourPhase;
|
||||
}
|
||||
|
||||
public CompletionSorterImpl defaultSorter(CompletionParameters parameters, final PrefixMatcher matcher) {
|
||||
final CompletionLocation location = new CompletionLocation(parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user