public void show() {
		// Do nothing if there is no content to display (popup size calculated to be 0)
		if (popupSize <= 0)
			return;

		double anchorX = config.getPopupPosition().isRight()
				? lastCaretBounds.getMaxX()
				: lastCaretBounds.getMinX() - popup.getWidth();
		double anchorY = config.getPopupPosition().isAbove()
				? lastCaretBounds.getMinY() - popupSize
				: lastCaretBounds.getMaxY();

		// Choose another position if the popup is off-screen.
		// if the popup is off-screen, flip the popup to the other side of the caret on that axis
		// (it will also avoid popup from being split between two screens)
		//
		// Code loosely adapted from PopupWindow#updateWindow(double, double)
		final Screen currentScreen = Utils.getScreenForPoint(anchorX, anchorY);
		final Rectangle2D screenBounds =
				Utils.hasFullScreenStage(currentScreen)
						? currentScreen.getBounds()
						: currentScreen.getVisualBounds();
		if (anchorY + popupSize > screenBounds.getMaxY()) {
			anchorY = lastCaretBounds.getMinY() - popupSize;
		} else if (anchorY < screenBounds.getMinY()) {
			anchorY = lastCaretBounds.getMaxY();
		}
		if (anchorX + popup.getWidth() > screenBounds.getMaxX()) {
			anchorX = lastCaretBounds.getMinX() - popup.getWidth();
		} else if (anchorX < screenBounds.getMinX()) {
			anchorX = lastCaretBounds.getMaxX();
		}

		popup.show(area, anchorX, anchorY);
	}
Shows the popup at the current caret position in the editor.

@see Popup#show(Node, double, double)
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/suggest/CompletionPopup.java