private static int getNextWordStopOffset(@NotNull CharSequence text, @NotNull CaretStop wordStop,
                                           @NotNull HighlighterIterator tokenIterator,
                                           int offset, int maxOffset, boolean isCamel) {
    int newOffset = offset + 1;
    for (; newOffset < maxOffset; newOffset++) {
      final boolean isTokenBoundary = advanceTokenOnBoundary(tokenIterator, text, newOffset);
      if (isWordStopOffset(text, wordStop, newOffset, isCamel, isTokenBoundary)) break;
    }
    return newOffset;
  }
private static int getNextWordStopOffset(@NotNull CharSequence text, @NotNull CaretStop wordStop,
                                           @NotNull HighlighterIterator tokenIterator,
                                           int offset, int maxOffset, boolean isCamel)