public boolean doComplete(@Nonnull String partialText) {
		// Get the selected value to complete.
		// Must be done before we hide the popup.
		T localSelected = selected;

		// We're done so we can hide the popup.
		hide();

		// Complete the selected item, clearing it now that we're done.
		if (localSelected != null) {
			selected = null;
			String toComplete = textifier.toText(localSelected);
			return complete(partialText, toComplete);
		}

		return false;
	}
Completes the current text with the value of {@link #getSelected()}.

@param partialText
		Current text to complete.

@return {@code true} on successful completion.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java