}
@Nullable
@Override
public TextRange surroundElements(@NotNull final Project project, @NotNull final Editor editor, final Expression element) throws IncorrectOperationException {
MathematicaPsiElementFactory factory = new MathematicaPsiElementFactory(project);
CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project);
Expression parExpr = factory.createExpressionFromText(myOpener + element.getText() + myCloser);
parExpr = (Expression) codeStyleManager.reformat(parExpr);
final PsiElement replace = element.replace(parExpr);
return TextRange.from(replace.getTextOffset() + replace.getTextLength(), 0);
}