Class MergeFormatter

java.lang.Object
com._1c.g5.v8.dt.compare.merge.MergeFormatter

public class MergeFormatter extends Object
The formatter to merge 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 of MergeFormatter with the given parameters.
      Parameters:
      mainDocument - the main document, can not be null
      otherDocument - the other document, can not be null
      mergeRule - the MergeRule, can not be null
      isThreeWay - indicates whether the merge is three-way
  • Method Details

    • merge

      public String merge(com._1c.g5.gumtree.core.DiffsCreator diffsCreator)
      Merges two documents according to the results of their comparison.
      Parameters:
      diffsCreator - the storage of diffs, can not be null
      Returns:
      the content of the result of merge, can not be null
    • merge

      public String merge(List<com._1c.g5.gumtree.core.LineDifference> lineDifferences)
      Merges two documents according to the results of their comparison.
      Parameters:
      lineDifferences - the LineDifference's of documents comparison, cannot be null
      Returns:
      the merge result, never null
    • getMergeConflicts

      public List<MergeResultDifference> getMergeConflicts()
      Returns the merge conflicts.
      Returns:
      the merge conflicts, never null, cannot be empty for three-way conflict merge