Class UserDefinedDiffTool
- java.lang.Object
-
- org.eclipse.jgit.internal.diffmergetool.UserDefinedDiffTool
-
- All Implemented Interfaces:
ExternalDiffTool
- Direct Known Subclasses:
PreDefinedDiffTool
public class UserDefinedDiffTool extends java.lang.Object implements ExternalDiffTool
The user-defined diff tool.
-
-
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.StringgetCommand()The command of the diff tool.java.lang.StringgetName()java.lang.StringgetPath()The path of the diff tool.voidsetPath(java.lang.String path)Overrides the path for the given tool.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceExternalDiffTool- 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>.pathin 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:
getPathin interfaceExternalDiffTool- 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 ofgetPath()and can sometimes include tool parameters.- Specified by:
getCommandin interfaceExternalDiffTool- 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 settingdifftool.<tool>.path.- Parameters:
path- the new diff tool path- See Also:
- https://git-scm.com/docs/git-difftool
-
-