void (@NotNull LocalInspectionToolSession session, @NotNull BlockingQueue<Pair<PsiFile, PsiElement>> injectedFilesWithHosts, @NotNull List<? extends Pair<PsiFile, PsiElement>> injectedFiles, @NotNull List<? extends LocalInspectionToolWrapper> wrappers, @NotNull List<? super InspectionContext> outInjectedContexts, @NotNull BiConsumer<? super ProblemDescriptor, ? super InspectionProblemHolder> addDescriptorIncrementallyCallback, @Nullable Condition<? super LocalInspectionToolWrapper> enabledToolsPredicate, Pair<PsiFile, PsiElement> tombStone) { if (injectedFiles.isEmpty()) { return; } processInOrder(injectedFilesWithHosts, tombStone, pair -> { PsiFile injectedPsi = pair.getFirst(); if (!shouldInspect(injectedPsi)) { return; } PsiElement host = pair.getSecond(); BiConsumer<? super ProblemDescriptor, ? super InspectionProblemHolder> applyIncrementallyCallback = (descriptor, holder) -> { PsiElement descriptorPsiElement = descriptor.getPsiElement(); LocalInspectionToolWrapper wrapper = holder.myToolWrapper; if (myIgnoreSuppressed && host != null && (wrapper.getTool().isSuppressedFor(host) || descriptorPsiElement != null && wrapper.getTool().isSuppressedFor(descriptorPsiElement))) { registerSuppressedElements(host, wrapper.getID(), wrapper.getAlternativeID()); return/* false*/; } if (myIsOnTheFly) { addDescriptorIncrementallyCallback.accept(descriptor, holder); } }; InspectionRunner injectedRunner = new InspectionRunner(injectedPsi, injectedPsi.getTextRange(), injectedPsi.getTextRange(), false, myIsOnTheFly, myProgress, myIgnoreSuppressed, myInspectionProfileWrapper, mySuppressedElements); List<? extends InspectionContext> injectedContexts = injectedRunner.inspect( wrappers, session.getMinimumSeverity(), true, applyIncrementallyCallback, emptyCallback, enabledToolsPredicate); outInjectedContexts.addAll(injectedContexts); }); }