int (@NotNull PsiPolyadicExpression e) { Integer firstNewLineIndex = null; for (PsiExpression operand : e.getOperands()) { PsiExpression literal = ObjectUtils.tryCast(PsiUtil.skipParenthesizedExprDown(operand), PsiLiteralExpression.class); if (literal == null) continue; String text = literal.getText(); int idx = getNewLineIndex(text, 0); if (idx == -1) continue; if (firstNewLineIndex != null) return firstNewLineIndex; firstNewLineIndex = literal.getTextOffset() + idx; if (getNewLineIndex(text, idx) != -1) return firstNewLineIndex; } return e.getTextOffset(); }