@Override
  public void handleInsert(@NotNull InsertionContext context) {
    markClassItemWrapped(getDelegate());
    super.handleInsert(context);

    context.commitDocument();
    PsiCallExpression callExpression = PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), context.getStartOffset(),
                                                                              PsiCallExpression.class, false);
    // make sure this is the constructor call we've just added, not the enclosing method/constructor call
    if (callExpression != null) {
      PsiExpressionList argumentList = callExpression.getArgumentList();
      if (myArguments != null && argumentList != null) {
        PsiExpressionList newList = ((PsiMethodCallExpression)JavaPsiFacade.getElementFactory(context.getProject())
          .createExpressionFromText("a(" + myArguments.canonical() + ")", argumentList)).getArgumentList();
        argumentList = (PsiExpressionList)argumentList.replace(newList);
        JavaCodeStyleManager.getInstance(context.getProject()).shortenClassReferences(argumentList);
        CaretModel model = context.getEditor().getCaretModel();
        int offset = argumentList.getTextRange().getEndOffset();
        if (model.getOffset() < offset) {
          model.moveToOffset(offset);
        }
        return;
      }
      PsiElement completedElement = callExpression instanceof PsiNewExpression newExpression ?
                                    newExpression.getClassOrAnonymousClassReference() : null;
      TextRange completedElementRange = completedElement == null ? null : completedElement.getTextRange();
      if (completedElementRange == null || completedElementRange.getStartOffset() != context.getStartOffset()) {
        callExpression = null;
      }
    }
    if (callExpression != null) {
      JavaMethodCallElement.showParameterHints(this, context, myConstructor, callExpression);
    }
  }
@Override
  public void handleInsert(@NotNull InsertionContext context)