public void updateItems(@Nonnull List<T> items) {
		// Compute the size of the popup.
		//  - (Number of cells to show at a time) * (size of cell)
		//  - Needs a bit of padding due to the way borders/scrollbars render
		// The scollpane should be dictating the size since it is the popup content root.
		int itemCount = items.size();
		popupSize = cellSize * (Math.min(itemCount, config.getMaxCompletionRows()) + 1);
		scrollPane.setPrefHeight(popupSize);
		scrollPane.setMaxHeight(popupSize);

		// Track what was selected beforehand.
		// Needs to be done before we reset the list-view items.
		T localSelected = selected;

		// Update the lists items.
		listView.getItems().setAll(items);

		// Select what was previously selected, or the first item if nothing was selected before.
		if (localSelected != null) {
			int index = items.indexOf(localSelected);
			if (index >= 0 && index < itemCount)
				listView.getSelectionModel().select(index);
			else
				listView.getSelectionModel().select(0);
		} else if (itemCount > 0) {
			listView.getSelectionModel().select(0);
		}
	}
Updates the items to support completion of, and updates the size of the UI
to fit exactly the number of items to show.

@param items
		Items to support completion of.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java