Class ExternalMergeToolUtils


  • public final class ExternalMergeToolUtils
    extends Object
    Utility methods used for running external comparison and merge tools.
    • Method Detail

      • runTwoWayComparison

        public static ExternalMergeToolExecutionStatus runTwoWayComparison​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                           InputStream mainStream,
                                                                           InputStream otherStream,
                                                                           String mainTitle,
                                                                           String otherTitle)
        Runs the two-way comparison using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainStream - the main stream to compare, cannot be null
        otherStream - the other stream to compare, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runTwoWayComparison

        public static ExternalMergeToolExecutionStatus runTwoWayComparison​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                           File mainFile,
                                                                           File otherFile,
                                                                           String mainTitle,
                                                                           String otherTitle)
        Runs the two-way comparison using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainFile - the main file to compare, cannot be null
        otherFile - the other file to compare, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runTwoWayMerge

        public static ExternalMergeToolExecutionStatus runTwoWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                      InputStream mainStream,
                                                                      InputStream otherStream,
                                                                      File mergeResultFile,
                                                                      String mainTitle,
                                                                      String otherTitle)
        Runs the two-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainStream - the main stream to merge, cannot be null
        otherStream - the other stream to merge, cannot be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runTwoWayMerge

        public static ExternalMergeToolExecutionStatus runTwoWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                      File mainFile,
                                                                      File otherFile,
                                                                      File mergeResultFile,
                                                                      String mainTitle,
                                                                      String otherTitle)
        Runs the two-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainFile - the main file to merge, cannot be null
        otherFile - the other file to merge, cannot be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runThreeWayComparison

        public static ExternalMergeToolExecutionStatus runThreeWayComparison​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                             InputStream mainStream,
                                                                             InputStream otherStream,
                                                                             InputStream ancestorStream,
                                                                             String mainTitle,
                                                                             String otherTitle,
                                                                             String ancestorTitle)
        Runs the three-way comparison using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainStream - the main stream to compare, cannot be null
        otherStream - the other stream to compare, cannot be null
        ancestorStream - the ancestor stream to compare, may be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runThreeWayComparison

        public static ExternalMergeToolExecutionStatus runThreeWayComparison​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                             File mainFile,
                                                                             File otherFile,
                                                                             File ancestorFile,
                                                                             String mainTitle,
                                                                             String otherTitle,
                                                                             String ancestorTitle)
        Runs the three-way comparison using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainFile - the main file to compare, cannot be null
        otherFile - the other file to compare, cannot be null
        ancestorFile - the ancestor file to compare, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runThreeWayMerge

        public static ExternalMergeToolExecutionStatus runThreeWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                        InputStream mainStream,
                                                                        InputStream otherStream,
                                                                        InputStream ancestorStream,
                                                                        File mergeResultFile,
                                                                        String mainTitle,
                                                                        String otherTitle,
                                                                        String ancestorTitle)
        Runs the three-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainStream - the main stream to merge, cannot be null
        otherStream - the other stream to merge, cannot be null
        ancestorStream - the ancestor stream to merge, may be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runThreeWayMerge

        public static ExternalMergeToolExecutionStatus runThreeWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                        File mainFile,
                                                                        File otherFile,
                                                                        File ancestorFile,
                                                                        File mergeResultFile,
                                                                        String mainTitle,
                                                                        String otherTitle,
                                                                        String ancestorTitle)
        Runs the three-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainFile - the main file to merge, cannot be null
        otherFile - the other file to merge, cannot be null
        ancestorFile - the ancestor file to merge, cannot be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runAutoThreeWayMerge

        public static ExternalMergeToolExecutionStatus runAutoThreeWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                            InputStream mainStream,
                                                                            InputStream otherStream,
                                                                            InputStream ancestorStream,
                                                                            File mergeResultFile,
                                                                            String mainTitle,
                                                                            String otherTitle,
                                                                            String ancestorTitle)
        Runs the automatic three-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainStream - the main stream to merge, cannot be null
        otherStream - the other stream to merge, cannot be null
        ancestorStream - the ancestor stream to merge, may be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null
      • runAutoThreeWayMerge

        public static ExternalMergeToolExecutionStatus runAutoThreeWayMerge​(ExternalMergeToolConfiguration externalMergeToolConfiguration,
                                                                            File mainFile,
                                                                            File otherFile,
                                                                            File ancestorFile,
                                                                            File mergeResultFile,
                                                                            String mainTitle,
                                                                            String otherTitle,
                                                                            String ancestorTitle)
        Runs the automatic three-way merge using the specified external merge tool.
        Parameters:
        externalMergeToolConfiguration - the external merge tool configuration, cannot be null
        mainFile - the main file to merge, cannot be null
        otherFile - the other file to merge, cannot be null
        ancestorFile - the ancestor file to merge, cannot be null
        mergeResultFile - the file to store merge result, cannot be null
        mainTitle - the main title, cannot be null
        otherTitle - the other title, cannot be null
        ancestorTitle - the ancestor title, cannot be null
        Returns:
        the external merge tool executation status, never null