@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) {
    PsiNewExpression newExpression = getNewExpression();
    if (newExpression == null) {
      return;
    }

    IdeDocumentHistory.getInstance(project).includeCurrentPlaceAsChangePlace();
    PsiJavaCodeReferenceElement referenceElement = getReferenceElement(newExpression);
    PsiClass psiClass = CreateFromUsageUtils.createClass(referenceElement, getKind(), null);
    if (psiClass != null) {
      WriteAction.run(() -> setupClassFromNewExpression(psiClass, newExpression));
    }
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)