List<TextRange> (@NotNull SelectionModel selectionModel) { final List<TextRange> ranges = new SmartList<>(); if (selectionModel.hasSelection()) { TextRange range = TextRange.create(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd()); ranges.add(range); } return ranges; }