private String getVariablePreview(VariableLocation loc) {
		if (loc instanceof VariableCommentFieldLocation) {
			return ((VariableCommentFieldLocation) loc).getComment();
		}

		Variable var = loc.getVariable();
		if (var == null) {
			return ""; // must no longer be a valid variable location
		}

		String comments = var.getComment();
		StringBuilder sb = new StringBuilder();

		DataType dt = var.getDataType();
		String dtName = "Unknown";
		if (dt != null) {
			dtName = dt.getDisplayName();
		}
		sb.append(dtName);
		sb.append(" ");
		sb.append(var.getVariableStorage().toString());
		sb.append(" ");
		sb.append(var.getName());
		if (comments != null) {
			sb.append(" ");
			sb.append(comments);
		}
		return sb.toString();
	}
Get the preview as HTML for the code unit at or containing the address associated with this cell's row.

@return the preview string.
Ghidra/Features/Base/src/main/java/ghidra/util/table/PreviewTableCellData.java