private boolean checkUnderReadAction(@NotNull MyValidatorProcessingItem item,
                                       @NotNull CompileContext context,
                                       @NotNull Computable<? extends Map<ProblemDescriptor, HighlightDisplayLevel>> runnable) {
    return DumbService.getInstance(context.getProject()).runReadActionInSmartMode(() -> {
      PsiFile file = item.getPsiFile();
      if (file == null) return false;

      Document document = myPsiDocumentManager.getCachedDocument(file);
      if (document != null && myPsiDocumentManager.isUncommited(document)) {
        String url = file.getViewProvider().getVirtualFile().getUrl();
        context.addMessage(CompilerMessageCategory.WARNING, JavaCompilerBundle.message("warning.text.file.has.been.changed"), url, -1, -1);
        return false;
      }

      return !reportProblems(context, runnable.compute());
    });
  }
private boolean checkUnderReadAction(@NotNull MyValidatorProcessingItem item,
                                       @NotNull CompileContext context,
                                       @NotNull Computable<? extends Map<ProblemDescriptor, HighlightDisplayLevel>> runnable)