private boolean noPrefixSearchValues(@NotNull CollectionListModel<Object> model, @Nullable String prefix) {
    if (StringUtil.isEmptyOrSpaces(prefix)) {
      return false;
    }

    int index = 0;
    while (index < model.getSize()) {
      String attribute = (String)model.getElementAt(index);
      if (attribute.equals(prefix)) {
        hidePopup();
        return true;
      }
      if (StringUtil.startsWithIgnoreCase(attribute, prefix)) {
        index++;
      }
      else {
        model.remove(index);
      }
    }

    if (model.isEmpty()) {
      handleShowPopupForQuery();
      return true;
    }

    return false;
  }
private boolean noPrefixSearchValues(@NotNull CollectionListModel<Object> model, @Nullable String prefix)