Search in sources :

Example 6 with SourceFilePosition

use of com.android.common.ide.common.blame.SourceFilePosition in project buck by facebook.

the class ActionRecorder method recordAttributeAction.

/**
     * Records an attribute action taken by the merging tool
     *
     * @param attribute              the attribute in question.
     * @param attributePosition      the attribute's position.
     * @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 SourcePosition attributePosition, @NonNull Actions.ActionType actionType, @Nullable AttributeOperationType attributeOperationType) {
    XmlElement originElement = attribute.getOwnerElement();
    Actions.AttributeRecord attributeRecord = new Actions.AttributeRecord(actionType, new SourceFilePosition(originElement.getDocument().getSourceFile(), attributePosition), attribute.getOriginalId(), null, /* reason */
    attributeOperationType);
    recordAttributeAction(attribute, attributeRecord);
}
Also used : SourceFilePosition(com.android.common.ide.common.blame.SourceFilePosition)

Aggregations

SourceFilePosition (com.android.common.ide.common.blame.SourceFilePosition)6 NonNull (com.android.annotations.NonNull)1 Message (com.android.common.ide.common.blame.Message)1 SourceFile (com.android.common.ide.common.blame.SourceFile)1 NodeKey (com.android.manifmerger.XmlNode.NodeKey)1 File (java.io.File)1