Class DiffTools


  • public class DiffTools
    extends java.lang.Object
    Manages diff tools.
    • Constructor Detail

      • DiffTools

        public DiffTools​(Repository repo)
        Creates the external diff-tools manager for given repository.
        Parameters:
        repo - the repository
    • Method Detail

      • compare

        public int compare​(java.lang.String newPath,
                           java.lang.String oldPath,
                           java.lang.String newId,
                           java.lang.String oldId,
                           java.lang.String toolName,
                           BooleanTriState prompt,
                           BooleanTriState gui,
                           BooleanTriState trustExitCode)
        Compare two versions of a file.
        Parameters:
        newPath - the new file path
        oldPath - the old file path
        newId - the new object ID
        oldId - the old object ID
        toolName - the selected tool name (can be null)
        prompt - the prompt option
        gui - the GUI option
        trustExitCode - the "trust exit code" option
        Returns:
        the return code from executed tool
      • getToolNames

        public java.util.Set<java.lang.String> getToolNames()
        Returns:
        the tool names
      • getUserDefinedTools

        public java.util.Map<java.lang.String,​ExternalDiffTool> getUserDefinedTools()
        Returns:
        the user defined tools
      • getAvailableTools

        public java.util.Map<java.lang.String,​ExternalDiffTool> getAvailableTools()
        Returns:
        the available predefined tools
      • getNotAvailableTools

        public java.util.Map<java.lang.String,​ExternalDiffTool> getNotAvailableTools()
        Returns:
        the NOT available predefined tools
      • getDefaultToolName

        public java.lang.String getDefaultToolName​(BooleanTriState gui)
        Parameters:
        gui - use the diff.guitool setting ?
        Returns:
        the default tool name
      • isInteractive

        public boolean isInteractive()
        Returns:
        is interactive (config prompt enabled) ?
      • setupPredefinedTools

        private void setupPredefinedTools()
      • setupUserDefinedTools

        private void setupUserDefinedTools()