- java.lang.Object
-
- org.eclipse.jgit.internal.diffmergetool.UserDefinedDiffTool
-
- org.eclipse.jgit.internal.diffmergetool.PreDefinedDiffTool
-
- All Implemented Interfaces:
ExternalDiffTool
public class PreDefinedDiffTool extends UserDefinedDiffTool
The pre-defined diff tool.
-
-
Constructor Summary
Constructors Constructor Description PreDefinedDiffTool(String name, String path, String parameters)Create a pre-defined diff toolPreDefinedDiffTool(CommandLineDiffTool tool)Creates the pre-defined diff tool
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommand()The command of the diff tool.voidsetPath(String path)Overrides the path for the given tool.-
Methods inherited from class org.eclipse.jgit.internal.diffmergetool.UserDefinedDiffTool
getName, getPath, isAvailable, setAvailable
-
-
-
-
Constructor Detail
-
PreDefinedDiffTool
public PreDefinedDiffTool(String name, String path, String parameters)
Create a pre-defined diff tool- Parameters:
name- the namepath- the pathparameters- the tool parameters as one string that is used together with path as command
-
PreDefinedDiffTool
public PreDefinedDiffTool(CommandLineDiffTool tool)
Creates the pre-defined diff tool- Parameters:
tool- the command line diff tool
-
-
Method Detail
-
setPath
public void setPath(String path)
Description copied from class:UserDefinedDiffToolOverrides the path for the given tool. Equivalent to settingdifftool.<tool>.path.- Overrides:
setPathin classUserDefinedDiffTool- Parameters:
path-- See Also:
- https://git-scm.com/docs/git-difftool
-
getCommand
public 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 ofUserDefinedDiffTool.getPath()and can sometimes include tool parameters.- Specified by:
getCommandin interfaceExternalDiffTool- Overrides:
getCommandin classUserDefinedDiffTool- Returns:
- the concatenated path and command of the pre-defined diff tool
- See Also:
- https://git-scm.com/docs/git-difftool
-
-