@Override
	public ActionContext getActionContext(MouseEvent event) {

		Component c = getComponent();
		KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
		Component focusedComponent = kfm.getFocusOwner();
		if (focusedComponent != null && SwingUtilities.isDescendingFrom(focusedComponent, c)) {
			c = focusedComponent;
		}

		if (event == null) {
			return new DialogActionContext(this, c);
		}

		Component sourceComponent = event.getComponent();
		if (sourceComponent != null) {
			c = sourceComponent;
		}
		return new DialogActionContext(this, c).setSourceObject(event.getSource());
	}
An optional extension point for subclasses to provider action context for the actions used by
this provider.

@param event The mouse event used (may be null) to generate a popup menu
Ghidra/Framework/Docking/src/main/java/docking/DialogComponentProvider.java