private void addDisplayLabel(Symbol symbol, int nameLength, int typeLength, int sourceLength) {
		String name = "";
		String type = "";
		String primary = getSpaces(7);
		String source = "";
		String namespace = "";
		String yes = getSpaces(2) + "yes" + getSpaces(2);
		String separatorSpaces = getSpaces(2);

		addText(indent2);
		if (symbol == null) {
			// Underline the header.
			underline("Name");
			addText(getSpaces(nameLength - "Name".length()));
			addText(separatorSpaces);
			underline("Type");
			addText(getSpaces(typeLength - "Type".length()));
			addText(separatorSpaces);
			underline("Primary");
			addText(separatorSpaces);
			underline("Source");
			addText(getSpaces(sourceLength - "Source".length()));
			addText(separatorSpaces);
			underline("Namespace");
		}
		else {
			name = symbol.getName();
			SymbolType symType = symbol.getSymbolType();
			type = symType.toString();
			source = symbol.getSource().toString();
			if (symbol.isPrimary()) {
				primary = yes;
			}
			Namespace parentNS = symbol.getParentNamespace();
			namespace = ((parentNS instanceof GlobalNamespace) ? parentNS.getName()
					: parentNS.getName(true));

			addColorText(name);
			addText(getSpaces(nameLength - name.length()));
			addText(separatorSpaces);
			addColorText(type);
			addText(getSpaces(typeLength - type.length()));
			addText(separatorSpaces);
			addColorText(primary);
			addText(separatorSpaces);
			addColorText(source);
			addText(getSpaces(sourceLength - source.length()));
			addText(separatorSpaces);
			addColorText(namespace);
			if (symbol.isPinned()) {
				addText(separatorSpaces);
				addColorText("(pinned)");
			}
		}
		addText(newLine);
	}
Gets a string indicating the label name and its attributes.
@param symbol the symbol to get the name and attributes for.
@param nameLength the length of the name field.
@param typeLength the length of the type field.
@param sourceLength the length of the source field.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiffDetails.java