public List<LookupElement> getVisibleItems() {
    ThreadingAssertions.assertEventDispatchThread();

    var itemsCount = list.getItemsCount();
    if (!myShown || itemsCount == 0) return Collections.emptyList();

    synchronized (uiLock) {
      int lowerItemIndex = list.getFirstVisibleIndex();
      int higherItemIndex = list.getLastVisibleIndex();
      if (lowerItemIndex < 0 || higherItemIndex < 0) return Collections.emptyList();

      return getListModel().toList().subList(lowerItemIndex, Math.min(higherItemIndex + 1, itemsCount));
    }
  }
public List<LookupElement> getVisibleItems()