- java.lang.Object
-
- org.eclipse.jgit.internal.diffmergetool.DiffTools
-
public class DiffTools extends Object
Manages diff tools.
-
-
Constructor Summary
Constructors Constructor Description DiffTools(Repository repo)Creates the external diff-tools manager for given repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(String newPath, String oldPath, String newId, String oldId, String toolName, BooleanTriState prompt, BooleanTriState gui, BooleanTriState trustExitCode)Compare two versions of a file.Map<String,ExternalDiffTool>getAvailableTools()StringgetDefaultToolName(BooleanTriState gui)Map<String,ExternalDiffTool>getNotAvailableTools()Set<String>getToolNames()Map<String,ExternalDiffTool>getUserDefinedTools()booleanisInteractive()
-
-
-
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(String newPath, String oldPath, String newId, String oldId, String toolName, BooleanTriState prompt, BooleanTriState gui, BooleanTriState trustExitCode)
Compare two versions of a file.- Parameters:
newPath- the new file patholdPath- the old file pathnewId- the new object IDoldId- the old object IDtoolName- the selected tool name (can be null)prompt- the prompt optiongui- the GUI optiontrustExitCode- the "trust exit code" option- Returns:
- the return code from executed tool
-
getUserDefinedTools
public Map<String,ExternalDiffTool> getUserDefinedTools()
- Returns:
- the user defined tools
-
getAvailableTools
public Map<String,ExternalDiffTool> getAvailableTools()
- Returns:
- the available predefined tools
-
getNotAvailableTools
public Map<String,ExternalDiffTool> getNotAvailableTools()
- Returns:
- the NOT available predefined tools
-
getDefaultToolName
public 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) ?
-
-