void (@NotNull final Project project, @NotNull final PsiFile file, @Nullable Editor editor, @NotNull final PsiElement startElement, @NotNull PsiElement endElement) { if (isAvailable(project, null, file)) { PsiDirectory directory = chooseDirectory(project, file); if (directory == null) return; WriteAction.run(() -> doCreate(directory, startElement)); } }