List<TextRange> (final ExceptionLineParser worker, final Document document, final LineResult previousLineResult) { return ReadAction.compute(() -> { List<TextRange> ranges = getTextRangeForMethod(worker, previousLineResult); if (ranges == null) return null; final List<TextRange> result = new ArrayList<>(); for (TextRange range : ranges) { result.add(new TextRange(document.getLineNumber(range.getStartOffset()), document.getLineNumber(range.getEndOffset()))); } return result; }); }