@Override
  public void invoke(@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);
    }
  }
@Override
  public void invoke(@NotNull Project project,
                     @NotNull PsiFile file,
                     @Nullable Editor editor,
                     @NotNull PsiElement startElement,
                     @NotNull PsiElement endElement)