void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; final PsiElement[] elements = {startElement}; if (startElement instanceof PsiParameter) { SafeDeleteProcessor.createInstance(project, null, elements, false, false, true).run(); } else { SafeDeleteHandler.invoke(project, elements, true); } }