void () { int startOffset = myCurrentInlayIndex > 0 ? myInlays.get(myCurrentInlayIndex - 1).getOffset() : mySegmentStartOffset; int endOffset = myCurrentInlayIndex < myInlays.size() ? myInlays.get(myCurrentInlayIndex).getOffset() : mySegmentEndOffset; int lineStartOffset = myDocument.getLineStartOffset(myCurrentEndLogicalLine); myFragmentIterator = myCurrentEndLogicalLine < myDocument.getLineCount() // handle empty document case ? myView.getTextLayoutCache().getLineLayout(myCurrentEndLogicalLine) .getFragmentsInVisualOrder(myView, myCurrentEndLogicalLine, myCurrentX, myCurrentVisualColumn, startOffset - lineStartOffset, endOffset - lineStartOffset, myQuickEvaluationListener) : Collections.emptyIterator(); }