Arrays.sort(fields, new FieldComparator());
for (Field element : fields) {
if (monitor != null) {
monitor.worked(1);
}
Field field = element;
String fldName = field.getName();
fldName += " - " + field.getType();
if (field.isCustom()) {
fldName += " (custom)";
}
fieldRoot = createTreeItemChild(fieldsRoot, fldName, true, 0, false, SchemaBrowser.PRIMARY_ROOT_FIELD);
fieldRoot.setData("field", element);
if (field.getHtmlFormatted()) {
createTreeItemChild(fieldRoot, "Field is HTML Formatted", false, 0, false);
}
if (field.getRelationshipName() != null) {
createTreeItemChild(fieldRoot, "Foreign Key: " + field.getRelationshipName(), false, 0, false);
}
TreeItem fieldAccessRoot = createTreeItemChild(fieldRoot, "Access", false, 0, false);
loadFieldAccessData(fieldAccessRoot, field);
if (field.getLabel() != null) {
TreeItem labelRoot = createTreeItemChild(fieldRoot, "Label", false, 0, false);
createTreeItemChild(labelRoot, field.getLabel(), false, 0, false);
}
TreeItem fieldTypeRoot =
createTreeItemChild(fieldRoot, "Type Data", false, 0, false, SchemaBrowser.DATA_TYPE_NODE);
loadFieldTypeData(fieldTypeRoot, field);