deleteTreeItem(target);
}
}
private void loadJSONConfig() {
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
try {
Map<String, String> map = JSONHandler.loadConfig(stepTreeContainer, rootItem, jsonConfig, permissions);
if (stepTree != null) {
stepTree.expandItemsRecursively(rootItem);
}
assigneeField.setValue(map.get(JSONHandler.ASSIGNEE));
swimlaneField.setValue(map.get(JSONHandler.SWIMLANE));
candidateGroupsField.setValue(map.get(JSONHandler.CANDIDATE_GROUPS));
commentaryTextArea.setValue(map.get(JSONHandler.COMMENTARY));
descriptionField.setValue(map.get(JSONHandler.DESCRIPTION));
for (Object widget : stepTreeContainer.getItemIds()) {
if (widget != rootItem) {
stepTree.getItem(widget).getItemProperty("icon").setValue(getWidgetIcon(((WidgetItemInStep) widget).getWidgetItem()));
}
}
} catch (WidgetNotFoundException e) {
logger.log(Level.SEVERE, "Widget not found", e);
application.getMainWindow().showNotification(messages.getMessage("error.config_not_loaded.title"),
messages.getMessage("error.config_not_loaded.widget_not_found.body", e.getWidgetItemName()),
Notification.TYPE_ERROR_MESSAGE);
} catch (ParsingFailedException e) {
logger.log(Level.SEVERE, "Parsing failed found", e);
application.getMainWindow().showNotification( messages.getMessage("error.config_not_loaded.title"),
messages.getMessage("error.config_not_loaded.unexpected_error.body", e.getLocalizedMessage()),
Notification.TYPE_ERROR_MESSAGE);
}
}