void (@Nullable GrStatementOwner owner, boolean shouldInsertReturnNull) { boolean hasLineFeed = false; for (PsiElement e = owner == null ? null : owner.getFirstChild(); e != null; e = e.getNextSibling()) { if (e instanceof GrStatement) { ((GrStatement)e).accept(this); hasLineFeed = false; } else if (TokenSets.COMMENT_SET.contains(e.getNode().getElementType())) { builder.append(e.getText()); } else if (org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil.isLineFeed(e)) { hasLineFeed = true; if (IN_TEST) { builder.append(genSameLineFeed(e.getText())); } else { builder.append(e.getText()); } } } if (shouldInsertReturnNull) { if (!hasLineFeed) { builder.append('\n'); } builder.append("return null;\n"); } }