boolean (GrExpression expr) { final Ref<Boolean> result = Ref.create(false); expr.accept(new GroovyRecursiveElementVisitor() { @Override public void visitLiteralExpression(@NotNull GrLiteral literal) { if (GrStringUtil.isMultilineStringLiteral(literal) && literal.getText().contains("\n")) { result.set(true); } } @Override public void visitElement(@NotNull GroovyPsiElement element) { if (!result.get()) { super.visitElement(element); } } }); return result.get(); }