Merger

com.phasmidsoftware.xmldoc.idml.Merger
object Merger

Combines two independent sets of edits (left and right, both relative to the same base) into one merge result, per MERGE.md's design direction. Built directly on EditDetector: nodes edited by only one side are trivially safe to apply; nodes edited by both sides are reconciled attribute-by-attribute, so (per the running HelloWorld2A/HelloWorld2B example) one side moving an object and the other restyling it combine cleanly, while two sides changing the same attribute differently is reported as a Conflict, not silently resolved either way. A node deleted by one side and updated by the other is also a Conflict (per Kaining's own catalogue of expected outcomes, 06-delete-vs-modify in MERGE.md - this deliberately disagrees with Lindholm's stated default of letting deletion win silently).

Deliberately narrow, matching EditDetector's own scope: only attribute-level content is reconciled, not child order/position - PcsMerger handles that; ThreeWayMerger combines the two.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Merger.type

Members list

Value members

Concrete methods

def merge(base: GenericElement, left: GenericElement, right: GenericElement, ignoredAttributes: Set[String] = ...): Seq[MergeOutcome]

Merges left and right, both relative to base.

Merges left and right, both relative to base.

Value parameters

base

the common ancestor.

ignoredAttributes

forwarded to EditDetector.detectEdits - see EditDetector.defaultIgnoredAttributes.

left

one independently modified version.

right

the other independently modified version.

Attributes

Returns

every insertion, deletion, safe attribute change, and conflict found.