void (@NotNull final PsiFile file, @NotNull final Editor editor, @NotNull final Project project, int offset) { PsiElement elementAtOffset = file.findElementAt(offset); if (elementAtOffset == null || !FileModificationService.getInstance().preparePsiElementForWrite(elementAtOffset)) { return; } generateOrFixComment(elementAtOffset, project, editor); }