public @NotNull CodeBlockSurrounder.SurroundResult surround() {
    Object marker = ObjectUtils.sentinel("CodeBlockSurrounder.MARKER");
    PsiExpression expr = PsiUtil.skipParenthesizedExprDown(myExpression);
    if (expr == null) {
      expr = myExpression;
    }
    PsiTreeUtil.mark(expr, marker);
    Project project = myExpression.getProject();
    PsiElementFactory factory = JavaPsiFacade.getElementFactory(project);
    boolean physical = myExpression.isPhysical();
    PsiStatement replacement = replace(project, factory);
    assert replacement.isPhysical() == physical;
    PsiElement anchor = anchor(replacement);
    PsiExpression newExpression = Objects.requireNonNull((PsiExpression)PsiTreeUtil.releaseMark(replacement, marker));
    return new SurroundResult(newExpression, replacement, anchor, this);
  }
public @NotNull CodeBlockSurrounder.SurroundResult surround()