private String checkLabelString(Symbol symbol, Program program) {

		if (!displayLocalNamespace && !displayNonLocalNamespace) {
			return simplifyTemplates(symbol.getName()); // no namespaces being shown
		}

		Namespace addressNamespace = program.getSymbolTable().getNamespace(symbol.getAddress());
		Namespace symbolNamespace = symbol.getParentNamespace();
		boolean isLocal = symbolNamespace.equals(addressNamespace);
		if (!isLocal) {
			return simplifyTemplates(symbol.getName(displayNonLocalNamespace));
		}

		// O.K., we ARE a local namespace, how to display it?
		if (!displayLocalNamespace) {
			return simplifyTemplates(symbol.getName());
		}

		// use the namespace name or a custom, user-defined value
		if (useLocalPrefixOverride) {
			return simplifyTemplates(localPrefixText + symbol.getName(false));
		}
		return simplifyTemplates(symbol.getName(true));
	}
@see ghidra.app.util.viewer.field.FieldFactory#getField(ProxyObj, int)
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/LabelFieldFactory.java