for (Command refined : oldCommands)
oldCommandsArray.put(workspace.getCommandHistory().getCommandJSON(workspace, refined));
worksheet.getMetadataContainer().getWorksheetProperties().setPropertyValue(
Property.oldCommandHistory, oldCommandsArray.toString());
}
CommandHistoryUtil historyUtil = new CommandHistoryUtil(history.getCommandsFromWorksheetId(worksheetId), workspace, worksheetId);
historyUtil.consolidateHistory();
if (!oldCommands.equals(historyUtil.getCommands())) {
uc.append(historyUtil.replayHistory());
uc.removeUpdateByClass(HistoryAddCommandUpdate.class);
uc.removeUpdateByClass(InfoUpdate.class);
uc.removeUpdateByClass(ErrorUpdate.class);
historyUtil.consolidateHistory();
uc.add(new HistoryUpdate(workspace.getCommandHistory()));
}
Set<String> inputColumns = historyUtil.generateInputColumns();
Set<String> outputColumns = historyUtil.generateOutputColumns();
JSONArray inputColumnsArray = new JSONArray();
JSONArray outputColumnsArray = new JSONArray();
for (String hNodeId : inputColumns) {
HNode hnode = workspace.getFactory().getHNode(hNodeId);
JSONArray hNodeRepresentation = hnode.getJSONArrayRepresentation(workspace.getFactory());