private static void advance(@NotNull HighlighterIterator iterator, boolean forward) {
    if (forward) {
      iterator.advance();
    }
    else {
      iterator.retreat();
    }
  }
private static void advance(@NotNull HighlighterIterator iterator, boolean forward)