private String getCodeUnitPreview(CodeUnitFormat format) {
		Address addr = location.getAddress();
		if (addr.isExternalAddress()) {
			Symbol s = program.getSymbolTable().getPrimarySymbol(addr);
			if (s != null) {
				ExternalLocation extLoc = program.getExternalManager().getExternalLocation(s);
				DataType dt = extLoc.getDataType();
				if (dt == null) {
					dt = DataType.DEFAULT;
				}
				return dt.getMnemonic(dt.getDefaultSettings());
			}
		}

		CodeUnit cu = program.getListing().getCodeUnitAt(addr);
		return getFormatedCodeUnitPreview(cu);
	}
Constructor

@param location the location for the preview
@param codeUnitFormat the format needed to render preview data
Ghidra/Features/Base/src/main/java/ghidra/util/table/PreviewTableCellData.java