@Override
	public boolean isEnabledForContext(ListingActionContext context) {
		if (context.hasSelection()) {
			return true;
		}
		Program program = context.getProgram();
		Address addr = context.getAddress();
		if (program == null || addr == null) {
			return false;
		}
		return program.getListing().getFunctionContaining(addr) != null;
	}
Creates a new action with the given name and associated to the given
plugin.
@param plugin the plugin this action is associated with.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/AnalyzeStackRefsAction.java