ThreeWayMerger
com.phasmidsoftware.xmldoc.idml.ThreeWayMerger
object ThreeWayMerger
The real, end-to-end 3-way merge, combining Merger's attribute-level reconciliation with PcsMerger's structural one - each catches conflicts, and resolves edits, that the other cannot:
Mergerdecides a matched node's own tag/attributes, attribute by attribute - so two sides changing different attributes of the same node (the runningHelloWorld2A/HelloWorld2Bexample,MergerSpec) combine cleanly. It has no notion of position at all, so it is blind to reordering and reparenting.PcsMergerdecides a node's position and parent - so a plain reorder or a Kaining10-group-ungroupreparenting conflict, both invisible toMerger, are handled correctly (PcsMergerSpec). Its ownContentrelation, though, only ever sees a node's whole tag+attributes as one indivisible blob - by itself, it would (wrongly) report theHelloWorld2A/HelloWorld2Bcase above as a conflict, since it can't tell "different attributes changed" from "the same attribute changed differently".
This reconciles the two: structure (which nodes exist, in what order, under what parent) comes entirely from PcsMerger/PcsTreeBuilder; a matched node's own tag/attributes come from Merger wherever Merger has an opinion (i.e. the node has a Self) - PcsMerger's own (coarser) content resolution only fills in the rest: Self-less nodes (Properties, the PathGeometry chain, ...), which Merger never sees at all.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ThreeWayMerger.type
Members list
In this article