Class PreDefinedMergeTool
- java.lang.Object
-
- org.eclipse.jgit.internal.diffmergetool.UserDefinedDiffTool
-
- org.eclipse.jgit.internal.diffmergetool.UserDefinedMergeTool
-
- org.eclipse.jgit.internal.diffmergetool.PreDefinedMergeTool
-
- All Implemented Interfaces:
ExternalDiffTool
,ExternalMergeTool
public class PreDefinedMergeTool extends UserDefinedMergeTool
The pre-defined merge tool.
-
-
Constructor Summary
Constructors Constructor Description PreDefinedMergeTool(String name, String path, String parametersWithBase, String parametersWithoutBase, BooleanTriState trustExitCode)
Creates the pre-defined merge toolPreDefinedMergeTool(CommandLineMergeTool tool)
Creates the pre-defined merge tool
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommand()
The command of the diff tool.String
getCommand(boolean withBase)
void
setTrustExitCode(BooleanTriState trustExitCode)
-
Methods inherited from class org.eclipse.jgit.internal.diffmergetool.UserDefinedMergeTool
getTrustExitCode
-
Methods inherited from class org.eclipse.jgit.internal.diffmergetool.UserDefinedDiffTool
getName, getPath, isAvailable, setAvailable, setPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool
getName, getPath, isAvailable
-
-
-
-
Constructor Detail
-
PreDefinedMergeTool
public PreDefinedMergeTool(String name, String path, String parametersWithBase, String parametersWithoutBase, BooleanTriState trustExitCode)
Creates the pre-defined merge tool- Parameters:
name
- the namepath
- the pathparametersWithBase
- the tool parameters that are used together with path as command and "base is present" ($BASE)parametersWithoutBase
- the tool parameters that are used together with path as command and "base is present" ($BASE)trustExitCode
- the "trust exit code" option
-
PreDefinedMergeTool
public PreDefinedMergeTool(CommandLineMergeTool tool)
Creates the pre-defined merge tool- Parameters:
tool
- the command line merge tool
-
-
Method Detail
-
setTrustExitCode
public void setTrustExitCode(BooleanTriState trustExitCode)
- Overrides:
setTrustExitCode
in classUserDefinedMergeTool
- Parameters:
trustExitCode
- the "trust exit code" option
-
getCommand
public String getCommand()
Description copied from class:UserDefinedDiffTool
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:
getCommand
in interfaceExternalDiffTool
- Overrides:
getCommand
in classUserDefinedDiffTool
- Returns:
- the tool command (with base present)
- See Also:
- https://git-scm.com/docs/git-difftool
-
getCommand
public String getCommand(boolean withBase)
- Specified by:
getCommand
in interfaceExternalMergeTool
- Overrides:
getCommand
in classUserDefinedMergeTool
- Parameters:
withBase
- get command with base present (true) or without base present (false)- Returns:
- the tool command
-
-