StringBuilder (PsiExpression expression, StringBuilder out) { if (expression instanceof PsiMethodCallExpression) { final PsiExpression explicitExpression = AddTypeArgumentsFix.addTypeArguments(expression, null); if (explicitExpression != null) { out.append(explicitExpression.getText()); } else { out.append(expression.getText()); } } else if (expression instanceof PsiParenthesizedExpression) { out.append('('); final PsiExpression expression1 = ((PsiParenthesizedExpression)expression).getExpression(); if (expression1 != null) { getExpressionText(expression1, out); } out.append(')'); } else if (expression instanceof PsiConditionalExpression conditional) { out.append(conditional.getCondition().getText()).append('?'); getExpressionText(conditional.getThenExpression(), out); out.append(':'); getExpressionText(conditional.getElseExpression(), out); } else { out.append(expression.getText()); } return out; }