mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[java] IDEA-355024 try not to propose suggestion in dumb mode
GitOrigin-RevId: dca5096fb7079ef4623f100fb0e7c0ab37eb2df4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
56773a418e
commit
46c1a5c6e9
@@ -29,8 +29,12 @@ public final class DumbIncompleteModeUtil {
|
||||
|
||||
public static boolean isDumbOrIncompleteMode(@NotNull PsiElement context) {
|
||||
Project project = context.getProject();
|
||||
return isDumbOrIncompleteMode(project);
|
||||
}
|
||||
|
||||
public static boolean isDumbOrIncompleteMode(@NotNull Project project) {
|
||||
return (DumbService.isDumb(project) && Registry.is("lombok.dumb.mode.enabled", false)) ||
|
||||
isIncompleteMode(context.getProject());
|
||||
isIncompleteMode(project);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.OrderEntry;
|
||||
import com.intellij.openapi.roots.OrderEnumerator;
|
||||
@@ -38,7 +39,7 @@ public final class LombokLibraryUtil {
|
||||
|
||||
ThreadingAssertions.assertReadAccess();
|
||||
return JavaLibraryUtil.hasLibraryJar(project, "org.projectlombok:lombok")
|
||||
|| detectLombokJarsSlow(project);
|
||||
|| (!DumbService.isDumb(project) && detectLombokJarsSlow(project));
|
||||
}
|
||||
|
||||
public static boolean hasLombokClasses(@Nullable Module module) {
|
||||
|
||||
Reference in New Issue
Block a user