Package com._1c.g5.v8.dt.compare.merge
Class MergeFormatter
java.lang.Object
com._1c.g5.v8.dt.compare.merge.MergeFormatter
The formatter to merge two documents according to the results of their comparison.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe extension ofLineDifferenceto store one side difference. -
Constructor Summary
ConstructorsConstructorDescriptionMergeFormatter(org.eclipse.jface.text.IDocument mainDocument, org.eclipse.jface.text.IDocument otherDocument, MergeRule mergeRule, boolean isThreeWay) Creates a new instance ofMergeFormatterwith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the merge conflicts.merge(com._1c.g5.gumtree.core.DiffsCreator diffsCreator) Merges two documents according to the results of their comparison.Merges two documents according to the results of their comparison.
-
Constructor Details
-
MergeFormatter
public MergeFormatter(org.eclipse.jface.text.IDocument mainDocument, org.eclipse.jface.text.IDocument otherDocument, MergeRule mergeRule, boolean isThreeWay) Creates a new instance ofMergeFormatterwith the given parameters.- Parameters:
mainDocument- the main document, can not benullotherDocument- the other document, can not benullmergeRule- theMergeRule, can not benullisThreeWay- indicates whether the merge is three-way
-
-
Method Details
-
merge
Merges two documents according to the results of their comparison.- Parameters:
diffsCreator- the storage of diffs, can not benull- Returns:
- the content of the result of merge, can not be
null
-
merge
Merges two documents according to the results of their comparison.- Parameters:
lineDifferences- theLineDifference's of documents comparison, cannot benull- Returns:
- the merge result, never
null
-
getMergeConflicts
Returns the merge conflicts.- Returns:
- the merge conflicts, never
null, cannot be empty for three-way conflict merge
-