mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
[java-completion] IDEA-380405 workaround for unstable com.intellij.codeInsight.completion.JavaNoVariantsDelegator.suggestNonImportedClasses
GitOrigin-RevId: 1256a333c8095d945a6f82ea085239f4e2319b14
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c3edbf2383
commit
7dc9fa29a4
@@ -67,17 +67,20 @@ public final class JavaNoVariantsDelegator extends CompletionContributor impleme
|
||||
JavaCompletionContributor.mayStartClassName(result) &&
|
||||
JavaCompletionContributor.isClassNamePossible(parameters) &&
|
||||
!JavaCompletionContributor.IN_PERMITS_LIST.accepts(parameters.getPosition())) {
|
||||
// workaround to show the first similar item as fast as possible
|
||||
suggestNonImportedClasses(parameters,
|
||||
JavaCompletionSorting.addJavaSorting(parameters, result.withPrefixMatcher(tracker.betterMatcher)),
|
||||
tracker.session);
|
||||
// todo workaround to show the first similar item as fast as possible IDEA-380405
|
||||
if (tracker.hasOnlyOneClass == Boolean.TRUE &&
|
||||
parameters.getProcess() instanceof CompletionProgressIndicator indicator &&
|
||||
Registry.is("ide.completion.command.faster.paint") &&
|
||||
GroupedCompletionContributor.isGroupEnabledInApp() &&
|
||||
CommandCompletionSettingsService.getInstance().commandCompletionEnabled()) {
|
||||
CommandCompletionSettingsService.getInstance().commandCompletionEnabled() &&
|
||||
parameters.getPosition() instanceof PsiIdentifier identifier &&
|
||||
identifier.getParent() instanceof PsiReferenceExpression referenceExpression &&
|
||||
referenceExpression.getParent() instanceof PsiExpressionStatement) {
|
||||
indicator.showLookupAsSoonAsPossible();
|
||||
}
|
||||
suggestNonImportedClasses(parameters,
|
||||
JavaCompletionSorting.addJavaSorting(parameters, result.withPrefixMatcher(tracker.betterMatcher)),
|
||||
tracker.session);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user