void (final @NotNull PsiFile file) { Project project = file.getProject(); final Document document = PsiDocumentManager.getInstance(project).getDocument(file); if (document == null) return; CommandProcessor.getInstance().addAffectedDocuments(project, document); }