Class AssistAction

java.lang.Object
javax.swing.AbstractAction
com.inductiveautomation.ignition.designer.ai.AssistAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class AssistAction extends AbstractAction
The "Ask AI" action shared by AssistButton (labeled panel button) and AssistToolbarButton (icon-only toolbar button). Usually built by EmbeddedAssistantBuilder.action() or its button terminals; hosts may also construct one by hand. Either way it needs only a live DesignerAiContext, not a ready one: the action reads DesignerAiContext.isReady() at construction, each bound button subscribes to DesignerAiContext.onReadyChange(Runnable) for as long as it is displayable, and the action renders itself disabled (with an explanatory tooltip) whenever no provider and model are configured. A host can therefore mount its button during Designer startup, before the catalog has loaded, and it enables itself once configuration lands.

The action owns the popup lifecycle: at most one JidePopup per action instance, opened adjacent to whichever bound button was clicked. Per-call-site state — popup ownership, embed host, prompt assists — lives here so the buttons stay pure presentation. An open popup is bound to its owner staying on screen and closes with it, so it cannot outlive the surface it edits.

See Also: