@Override
  public @NotNull List<Caret> getAllCarets() {
    List<Caret> carets;
    synchronized (myCarets) {
      carets = new ArrayList<>(myCarets);
    }
    carets.sort(CARET_POSITION_COMPARATOR);
    return carets;
  }
@Override
  public @NotNull List<Caret> getAllCarets()