use of eu.esdihumboldt.hale.common.instance.extension.validation.report.InstanceValidationMessage in project hale by halestudio.
the class DefinitionInstanceLabelProvider method getToolTipText.
/**
* @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
*/
@Override
public String getToolTipText(Object element) {
if (element instanceof EntityDefinition) {
InstanceValidationReport report = validator.validate(instance);
Collection<InstanceValidationMessage> warnings = report.getWarnings();
if (warnings.isEmpty())
return null;
StringBuilder toolTip = new StringBuilder();
for (Message m : warnings) toolTip.append(m.getFormattedMessage()).append('\n');
return toolTip.substring(0, toolTip.length() - 1);
} else
return null;
}
Aggregations