void (@NotNull Project project, Editor editor, PsiFile file) { if (!FileModificationService.getInstance().prepareFileForWrite(file) || isPsiModificationStampChanged(project) || candidates.isEmpty()) { return; } ApplicationManager.getApplication().runWriteAction(() -> { createQuestionAction(candidates, project, editor).execute(); }); }