Extract getText() method

This commit is contained in:
Alexey Sedunov
2013-05-15 18:44:15 +04:00
parent 158c2753b8
commit 9442f96b87
5 changed files with 21 additions and 17 deletions
@@ -154,7 +154,7 @@ public class IfWhenUtils {
builder.elseBranch(branch);
} else {
String branchConditionText = combineWhenConditions(entry.getConditions(), whenExpression.getSubjectExpression());
builder.ifBranch(branchConditionText, branch != null ? branch.getText() : "");
builder.ifBranch(branchConditionText, JetPsiUtil.getText(branch));
}
}
@@ -188,7 +188,7 @@ public class WhenUtils {
if (subject != null) {
return toBinaryExpression(parenthesizeIfNeeded(subject), "==", parenthesizeIfNeeded(conditionExpression));
}
return conditionExpression != null ? conditionExpression.getText() : "";
return JetPsiUtil.getText(conditionExpression);
}
@NotNull