Package org.eclipse.jgit.pgm
Class DiffTool
- java.lang.Object
-
- org.eclipse.jgit.pgm.TextBuiltin
-
- org.eclipse.jgit.pgm.DiffTool
-
class DiffTool extends TextBuiltin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.pgm.TextBuiltin
TextBuiltin.TerminatedByHelpException
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
cached
private DiffFormatter
diffFmt
private DiffTools
diffTools
private BooleanTriState
gui
private AbstractTreeIterator
newTree
private AbstractTreeIterator
oldTree
private TreeFilter
pathFilter
private BooleanTriState
prompt
private boolean
toolHelp
private java.lang.String
toolName
private BooleanTriState
trustExitCode
-
Constructor Summary
Constructors Constructor Description DiffTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
compare(java.util.List<DiffEntry> files, boolean showPrompt, java.lang.String toolNamePrompt)
private java.util.List<DiffEntry>
getFiles()
protected void
init(Repository repository, java.lang.String gitDir)
Initialize the command to work with a repository.private boolean
isLaunchCompare(int fileIndex, int fileCount, java.lang.String fileName, java.lang.String toolNamePrompt)
(package private) void
noGui(boolean on)
(package private) void
noPrompt(boolean on)
(package private) void
noTrustExitCode(boolean on)
protected void
run()
Perform the actions of this command.(package private) void
setGui(boolean on)
(package private) void
setPrompt(boolean on)
(package private) void
setTrustExitCode(boolean on)
private void
showToolHelp()
-
Methods inherited from class org.eclipse.jgit.pgm.TextBuiltin
abbreviateRef, containsHelp, die, die, die, die, execute, getErrorWriter, getOutputWriter, getRepository, getResourceBundle, initRaw, parseArguments, printUsage, printUsageAndExit, printUsageAndExit, requiresRepository, resolve, setCommandName
-
-
-
-
Field Detail
-
diffFmt
private DiffFormatter diffFmt
-
diffTools
private DiffTools diffTools
-
oldTree
private AbstractTreeIterator oldTree
-
newTree
private AbstractTreeIterator newTree
-
toolName
private java.lang.String toolName
-
cached
private boolean cached
-
prompt
private BooleanTriState prompt
-
toolHelp
private boolean toolHelp
-
gui
private BooleanTriState gui
-
trustExitCode
private BooleanTriState trustExitCode
-
pathFilter
private TreeFilter pathFilter
-
-
Method Detail
-
setPrompt
void setPrompt(boolean on)
-
noPrompt
void noPrompt(boolean on)
-
setGui
void setGui(boolean on)
-
noGui
void noGui(boolean on)
-
setTrustExitCode
void setTrustExitCode(boolean on)
-
noTrustExitCode
void noTrustExitCode(boolean on)
-
init
protected void init(Repository repository, java.lang.String gitDir)
Description copied from class:TextBuiltin
Initialize the command to work with a repository.- Overrides:
init
in classTextBuiltin
- Parameters:
repository
- the opened repository that the command should work on.gitDir
- value of the--git-dir
command line option, ifrepository
is null.
-
run
protected void run()
Description copied from class:TextBuiltin
Perform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[])
.- Specified by:
run
in classTextBuiltin
-
compare
private void compare(java.util.List<DiffEntry> files, boolean showPrompt, java.lang.String toolNamePrompt) throws java.io.IOException
- Throws:
java.io.IOException
-
isLaunchCompare
private boolean isLaunchCompare(int fileIndex, int fileCount, java.lang.String fileName, java.lang.String toolNamePrompt) throws java.io.IOException
- Throws:
java.io.IOException
-
showToolHelp
private void showToolHelp() throws java.io.IOException
- Throws:
java.io.IOException
-
getFiles
private java.util.List<DiffEntry> getFiles() throws RevisionSyntaxException, AmbiguousObjectException, IncorrectObjectTypeException, java.io.IOException
- Throws:
RevisionSyntaxException
AmbiguousObjectException
IncorrectObjectTypeException
java.io.IOException
-
-