use of teamdash.hist.BlameValueList in project processdash by dtuma.
the class BlameHistoryDialog method setBlameComments.
private boolean setBlameComments(BlameCaretPos caretPos) {
breadcrumb.clear();
blameChanges.clearRows();
dataProblems.setCurrentNode(null);
rejectAction.setEnabled(false);
if (caretPos == null || blameData == null)
return false;
if (!caretPos.isSingleCell()) {
int numChanges = blameData.countAnnotations(caretPos);
String message = resources.format("Message.Multiple_FMT", numChanges);
blameChanges.showMessage(message);
return numChanges > 0;
}
ModelType modelType = caretPos.getModelType();
BlameModelData modelData = blameData.get(modelType);
if (modelData == null)
return false;
Integer nodeID = caretPos.getSingleNode();
BlameNodeData nodeData = modelData.get(nodeID);
if (nodeData == null)
return false;
WBSNode node = wbsDataModel.getWBSModel().getNodeMap().get(nodeID);
String nodePath = (node == null ? null : node.getFullName());
String columnID = caretPos.getSingleColumn();
if (WBSNodeColumn.COLUMN_ID.equals(columnID)) {
breadcrumb.setPath(nodePath, null);
blameChanges.setBlameNodeStructure(nodeData);
dataProblems.setCurrentNode(nodeID);
rejectAction.setEnabled(true);
return nodeData.hasStructuralChange();
}
if (nodeData.getAttributes() == null)
return false;
for (BlameValueList val : nodeData.getAttributes().values()) {
if (val.columnMatches(columnID)) {
int col = wbsDataModel.findColumn(columnID);
String columnName = wbsDataModel.getColumnName(col);
breadcrumb.setPath(nodePath, columnName);
blameChanges.setBlameValueList(val);
dataProblems.setCurrentNode(nodeID);
rejectAction.setEnabled(true);
return true;
}
}
return false;
}
Aggregations