void (boolean camel, CharSequence editorText, int cursorOffset, @NotNull List<? super TextRange> ranges, CharCondition isWordPartCondition) { TextRange camelRange = camel ? getCamelSelectionRange(editorText, cursorOffset, isWordPartCondition) : null; if (camelRange != null) { ranges.add(camelRange); } TextRange range = getWordSelectionRange(editorText, cursorOffset, isWordPartCondition); if (range != null && !range.equals(camelRange)) { ranges.add(range); } }