+ /**
+ * Set results of a validation operation
+ *
+ * Invalid entries are designated by a string of the form "<type_code>/<property_name>".
+ *
+ * This method must be called in the SWT thread.
+ *
+ * @param result A set of strings representing invalid entries
+ */
+ public void setValidationResult(Set<String> result) {
+ if (result != null && result.isEmpty())
+ result = null;
+
+ this.validationResult = result;
+ if (result != null) {
+ String keyName = getKeyColumnName(componentType);
+
+ bodyDataLayer.setConfigLabelAccumulator(new IConfigLabelAccumulator() {
+ @Override
+ public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
+ if (keyName != null) {
+ int keyColumn = bodyDataProvider.getVariableIndex(keyName);
+ if (keyColumn >= 0) {
+ String key = (String) bodyDataProvider.getDataValue(keyColumn, rowPosition);
+ String columnName = bodyDataProvider.getVariableName(columnPosition);
+
+ if (validationResult.contains(key + "/" + columnName)) {
+ configLabels.addLabel(INVALID_LABEL);
+ }
+ }
+ }
+ }
+ });
+ } else {
+ bodyDataLayer.setConfigLabelAccumulator(null);
+ }
+
+ table.refresh();
+ }