private ScreenElement getFunctionScreenElement(Function function) {
		if (function == null || !function.isThunk()) {
			return OptionsGui.FUN_NAME;
		}

		// override function name color for external thunks which are not linked
		Function thunkedFunction = function.getThunkedFunction(true);
		if (thunkedFunction == null) {
			return OptionsGui.EXT_REF_UNRESOLVED;
		}
		else if (thunkedFunction.isExternal()) {
			ExternalLocation location = thunkedFunction.getExternalLocation();
			String libName = location.getLibraryName();
			return getExternalPathScreenElement(function.getProgram(), libName);
		}

		return OptionsGui.FUN_NAME;
	}
Get the ScreenElement corresponding to the type of the reference.
@param p the program
@param r the reference to inspect
@return the screen element
Ghidra/Features/Base/src/main/java/ghidra/app/util/SymbolInspector.java