private Function getFunction(ProgramLocation location) {
		if (location == null) {
			return null;
		}
		FunctionManager functionManager = currentProgram.getFunctionManager();
		Address address = location.getAddress();
		Function destinationFunction = getReferencedFunction(address);
		if (destinationFunction != null) {
			return destinationFunction;
		}
		return functionManager.getFunctionContaining(address);
	}
Assuming a function <b>foo</b>, this plugin will show:
 1) all callers of <b>foo</b> 
 2) all functions which reference <b>foo</b>
 3) all callees of <b>foo</b>
 4) all functions referenced by <b>foo</b>.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/calltree/CallTreePlugin.java