List<TextRange> () { PsiLiteralExpression literal = ObjectUtils.tryCast(myNode.getPsi(), PsiLiteralExpression.class); if (literal == null || !literal.isTextBlock()) return Collections.emptyList(); int indent = PsiLiteralUtil.getTextBlockIndent(literal); if (indent == -1) return Collections.emptyList(); String text = myNode.getText(); List<TextRange> linesRanges = new ArrayList<>(); // open quotes int start = StringUtil.indexOf(text, '\n', 3); if (start == -1) return Collections.emptyList(); linesRanges.add(new TextRange(0, start)); start += 1; while (start < text.length()) { int end = StringUtil.indexOf(text, '\n', start); if (end == -1) end = text.length(); if (start + indent < end) start += indent; if (start != end) linesRanges.add(new TextRange(start, end)); start = end + 1; } return linesRanges; }