public B popupWhen(Predicate<C> predicate) {
		popupPredicate = Objects.requireNonNull(predicate);
		return self();
	}
Sets a predicate for dynamically determining if this action should be included in
an impending pop-up menu.  If this predicate is not set, the action will be included
in an impending pop-up if it is enabled. See {@link DockingActionIf#isAddToPopup(ActionContext)}.

<p>Note: use this method when you wish for an action to be added to a popup menu regardless
of whether it is enabled.  As mentioned above, standard popup actions will only be added
to the popup when they are enabled. 
 
<p>Note: using this method is not sufficient to cause the action to appear in a popup 
menu.  You must also use {@link #popupMenuPath(String...)}.
 
@param predicate the predicate that will be used to dynamically determine whether an 
       action is added to a popup menu
@return this builder (for chaining)
@see #popupMenuPath(String...)
Ghidra/Framework/Docking/src/main/java/docking/action/builder/AbstractActionBuilder.java