// ItemNames in composite data
List<String> itemNames = new ArrayList<String>(data.getCompositeType().keySet());
for (String itemName : itemNames)
{
OpenType itemType = data.getCompositeType().getType(itemName);
Label keyLabel = toolkit.createLabel(compositeHolder, itemName, SWT.TRAIL);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
layoutData.minimumWidth = 70;
keyLabel.setLayoutData(layoutData);
if (itemType.isArray())
{
OpenType type = ((ArrayType)itemType).getElementOpenType();
// If Byte array and mimetype is text, convert to text string
if (type.getClassName().equals(Byte.class.getName()))
{
String mimeType = null;
String encoding = null;
if (data.containsKey("MimeType"))
{
mimeType = (String)data.get("MimeType");
}
if (data.containsKey("Encoding"))
{
encoding = (String)data.get("Encoding");
}
if (encoding == null || encoding.length() == 0)
{
encoding = Charset.defaultCharset().name();
}
if ("text/plain".equals(mimeType))
{
convertByteArray(toolkit, compositeHolder, data, itemName, encoding);
}
else
{
handleBinaryMessageContent(toolkit, compositeHolder, data, itemName, encoding);
}
}
// If array of any other supported type, show as a list of String array
else if (SUPPORTED_ARRAY_DATATYPES.contains(type.getClassName()))
{
convertArrayItemForDisplay(compositeHolder, data, itemName);
}
else
{