Class UserDefinedDiffTool

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String cmd
      the diff tool command
      private java.lang.String name
      the diff tool name
      private java.lang.String path
      the diff tool path
    • Constructor Summary

      Constructors 
      Constructor Description
      UserDefinedDiffTool​(java.lang.String name, java.lang.String path, java.lang.String cmd)
      Creates the diff tool
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCommand()
      The command of the diff tool.
      java.lang.String getName()  
      java.lang.String getPath()
      The path of the diff tool.
      void setPath​(java.lang.String path)
      Overrides the path for the given tool.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
        the diff tool name
      • path

        private java.lang.String path
        the diff tool path
      • cmd

        private final java.lang.String cmd
        the diff tool command
    • Constructor Detail

      • UserDefinedDiffTool

        public UserDefinedDiffTool​(java.lang.String name,
                                   java.lang.String path,
                                   java.lang.String cmd)
        Creates the diff tool
        Parameters:
        name - the name
        path - the path
        cmd - the command
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface ExternalDiffTool
        Returns:
        the diff tool name
      • getPath

        public java.lang.String getPath()
        The path of the diff tool.

        The path to a pre-defined external diff tool can be overridden by specifying difftool.<tool>.path in a configuration file.

        For a user defined diff tool (that does not override a pre-defined diff tool), the path is ignored when invoking the tool.

        Specified by:
        getPath in interface ExternalDiffTool
        Returns:
        the diff tool path
        See Also:
        https://git-scm.com/docs/git-difftool
      • getCommand

        public java.lang.String getCommand()
        The command of the diff tool.

        A pre-defined external diff tool can be overridden using the tools name in a configuration file. The overwritten tool is then a user defined tool and the command of the diff tool is specified with difftool.<tool>.cmd. This command must work without prepending the value of getPath() and can sometimes include tool parameters.

        Specified by:
        getCommand in interface ExternalDiffTool
        Returns:
        the diff tool command
        See Also:
        https://git-scm.com/docs/git-difftool
      • setPath

        public void setPath​(java.lang.String path)
        Overrides the path for the given tool. Equivalent to setting difftool.<tool>.path.
        Parameters:
        path - the new diff tool path
        See Also:
        https://git-scm.com/docs/git-difftool