/** * Records an attribute action taken by the merging tool * * @param attribute the attribute in question. * @param actionType the action's type * @param attributeOperationType the original tool annotation leading to the merging tool * decision. */ synchronized void recordAttributeAction( @NonNull XmlAttribute attribute, @NonNull Actions.ActionType actionType, @Nullable AttributeOperationType attributeOperationType) { recordAttributeAction( attribute, attribute.getPosition(), actionType, attributeOperationType); }
xmlElement.getPosition().getStartLine() + 1, attributeOperationTypeEntry.getKey(), attribute.get().getPosition().getStartLine() + 1 ));
private void parse(@NonNull XmlElement element, @NonNull ImmutableMultimap.Builder<Integer, Record> mappings) { DecisionTreeRecord decisionTreeRecord = mRecords.get(element.getId()); if (decisionTreeRecord != null) { Actions.NodeRecord nodeRecord = findNodeRecord(decisionTreeRecord); if (nodeRecord != null) { mappings.put(element.getPosition().getStartLine(), nodeRecord); } for (XmlAttribute xmlAttribute : element.getAttributes()) { Actions.AttributeRecord attributeRecord = findAttributeRecord(decisionTreeRecord, xmlAttribute); if (attributeRecord != null) { mappings.put(xmlAttribute.getPosition().getStartLine(), attributeRecord); } } } for (XmlElement xmlElement : element.getMergeableElements()) { parse(xmlElement, mappings); } }
void addMessage(@NonNull MergingReport.Builder report, @NonNull SourcePosition position, @NonNull MergingReport.Record.Severity severity, @NonNull String message) { report.addMessage( new SourceFilePosition(getOwnerElement().getDocument().getSourceFile(), position), severity, message); }