private static boolean isWordStopOffset(@NotNull CharSequence text, @NotNull CaretStop wordStop,
                                          int offset, boolean isCamel, boolean isLexemeBoundary) {
    if (wordStop.isAtStart() && wordStop.isAtEnd()) {
      return isLexemeBoundary ||
             isWordStart(text, offset, isCamel) ||
             isWordEnd(text, offset, isCamel);
    }
    if (wordStop.isAtStart()) return isLexemeBoundary && !isWordEnd(text, offset, isCamel) || isWordStart(text, offset, isCamel);
    if (wordStop.isAtEnd()) return isLexemeBoundary && !isWordStart(text, offset, isCamel) || isWordEnd(text, offset, isCamel);
    return false;
  }
private static boolean isWordStopOffset(@NotNull CharSequence text, @NotNull CaretStop wordStop,
                                          int offset, boolean isCamel, boolean isLexemeBoundary)