void (@NotNull Project project, @NotNull Editor editor, @NotNull PsiComment comment) { if (!(comment instanceof PsiDocComment docComment)) { return; } PsiJavaDocumentedElement owner = docComment.getOwner(); if (owner == null) return; PsiFile file = owner.getContainingFile(); if (file == null) return; Map<LocalInspectionToolWrapper, List<ProblemDescriptor>> referenceProblems = InspectionEngine.inspectElements(Collections.singletonList(new LocalInspectionToolWrapper(new JavaDocReferenceInspection())), file, file.getTextRange(), true, false, new DaemonProgressIndicator(), Collections.singletonList(owner), PairProcessor.alwaysTrue()); List<LocalInspectionToolWrapper> toolWrappers = List.of( new LocalInspectionToolWrapper(getMissingJavadocInspection()), new LocalInspectionToolWrapper(getJavadocDeclarationInspection()) ); Map<LocalInspectionToolWrapper, List<ProblemDescriptor>> commonProblems = InspectionEngine.inspectElements(toolWrappers, file, file.getTextRange(), true, true, new DaemonProgressIndicator(), Collections.singletonList(owner), PairProcessor.alwaysTrue()); if (!referenceProblems.isEmpty()) { fixReferenceProblems(ContainerUtil.flatten(referenceProblems.values()), project); } if (!commonProblems.isEmpty()) { fixCommonProblems(ContainerUtil.flatten(commonProblems.values()), comment, editor.getDocument(), project); } PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(editor.getDocument()); ensureContentOrdered(docComment, editor.getDocument()); locateCaret(docComment, editor, file); }