private String getFormatedCodeUnitPreview(CodeUnit cu) {

		if (cu == null) {
			return null;
		}

		if (!(cu instanceof Data)) {
			return formatter.getRepresentationString(cu);
		}

		Data data = (Data) cu;
		String preview = formatter.getRepresentationString(data);
		if (data.getParent() != null) {
			String path = getDataPath(data);
			if (!path.equals(preview)) {
				preview += path;
			}
		}

		return preview;
	}
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