private Object getFirstAvailableObjectThatHasHelp(Object startingHelpObject) {
		if (startingHelpObject == null) {
			return null;
		}

		// First see if help exists for the given component directly...                
		HelpService helpService = DockingWindowManager.getHelpService();
		HelpLocation helpLocation = helpService.getHelpLocation(startingHelpObject);
		if (helpLocation != null) {
			return startingHelpObject;
		}

		// Second, with no help registered for the starting component, start looking for a suitable
		// help proxy.
		//
		// For Components, we can walk their containment hierarchy to find a potential help object
		if (!(startingHelpObject instanceof Component)) {
			// not a Component; don't know how to find a better help object 
			return null;
		}

		return getFirstAvailableComponentThatHasHelp((Component) startingHelpObject);
	}
A base system action used for actions that show help information.
Ghidra/Framework/Docking/src/main/java/docking/action/AbstractHelpAction.java