@Override
  public void invoke(final @NotNull Project project,
                     @NotNull PsiFile file,
                     final @Nullable Editor editor,
                     final @NotNull PsiElement startElement,
                     @NotNull PsiElement endElement) {
    if (editor == null) return;
    PsiJavaCodeReferenceElement classReference = ((PsiNewExpression)startElement).getClassReference();
    if (classReference == null) return;
    final PsiClass psiClass = (PsiClass)classReference.resolve();
    if (psiClass == null) return;
    chooseMethodsToImplement(editor, startElement, psiClass, false, chooser -> {
      if (chooser == null) return;

      final List<PsiMethodMember> selectedElements = chooser.getSelectedElements();
      OverrideOrImplementOptions options = chooser.getOptions();

      if (selectedElements == null || selectedElements.isEmpty()) return;

      WriteCommandAction.writeCommandAction(project, file).run(() -> {
        implementNewMethods(project, editor, startElement, selectedElements, options);
      });
    });
  }
@Override
  public void invoke(final @NotNull Project project,
                     @NotNull PsiFile file,
                     final @Nullable Editor editor,
                     final @NotNull PsiElement startElement,
                     @NotNull PsiElement endElement)