diff --git a/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java b/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java index 562bf10626e7..f2e760b997b3 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java @@ -16,6 +16,11 @@ import java.util.regex.Pattern; /** * Base class for local inspections. + *

+ * You can make your inspection dumb-aware by marking it with {@link com.intellij.openapi.project.DumbAware DumbAware} interface. + * Such an inspection must not use indexes during its inference, or it must be prepared to catch + * {@link com.intellij.openapi.project.IndexNotReadyException IndexNotReadyException}. + * In this case, the inspection shall just silently catch it and not report any warnings. * * @see Code Inspections (IntelliJ Platform Docs) * @see GlobalInspectionTool diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/ex/LocalInspectionToolWrapper.java b/platform/analysis-impl/src/com/intellij/codeInspection/ex/LocalInspectionToolWrapper.java index f33a9c0a11e3..e27ff800f00b 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/ex/LocalInspectionToolWrapper.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/ex/LocalInspectionToolWrapper.java @@ -54,7 +54,7 @@ public class LocalInspectionToolWrapper extends InspectionToolWrapper findTool2RunInBatch(@NotNull Project project, diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java index 1c38ad4c9f6d..09c9e92566b6 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/LocalInspectionsPass.java @@ -105,7 +105,8 @@ final class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass List activeToolWrappers; List disabledSmartOnlyToolWrappers; if (isDumbMode()) { - activeToolWrappers = ContainerUtil.filter(toolWrappers, wrapper -> wrapper.isDumbAware()); + activeToolWrappers = toolWrappers.stream().parallel().filter(wrapper -> wrapper.isDumbAware()).toList(); + if (activeToolWrappers.isEmpty()) { disabledSmartOnlyToolWrappers = toolWrappers; } diff --git a/plugins/grazie/resources/META-INF/plugin.xml b/plugins/grazie/resources/META-INF/plugin.xml index d36d78b475a0..0c7f0d16c254 100644 --- a/plugins/grazie/resources/META-INF/plugin.xml +++ b/plugins/grazie/resources/META-INF/plugin.xml @@ -46,7 +46,7 @@ + level="GRAMMAR_ERROR" key="grazie.grammar.inspection.grammar.text"/> + implementationClass="com.intellij.spellchecker.inspections.SpellCheckingInspection"/>