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 booleancachedprivate DiffFormatterdiffFmtprivate DiffToolsdiffToolsprivate BooleanTriStateguiprivate AbstractTreeIteratornewTreeprivate AbstractTreeIteratoroldTreeprivate TreeFilterpathFilterprivate BooleanTriStatepromptprivate booleantoolHelpprivate java.lang.StringtoolNameprivate BooleanTriStatetrustExitCode
-
Constructor Summary
Constructors Constructor Description DiffTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcompare(java.util.List<DiffEntry> files, boolean showPrompt, java.lang.String toolNamePrompt)private java.util.List<DiffEntry>getFiles()protected voidinit(Repository repository, java.lang.String gitDir)Initialize the command to work with a repository.private booleanisLaunchCompare(int fileIndex, int fileCount, java.lang.String fileName, java.lang.String toolNamePrompt)(package private) voidnoGui(boolean on)(package private) voidnoPrompt(boolean on)(package private) voidnoTrustExitCode(boolean on)protected voidrun()Perform the actions of this command.(package private) voidsetGui(boolean on)(package private) voidsetPrompt(boolean on)(package private) voidsetTrustExitCode(boolean on)private voidshowToolHelp()-
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:TextBuiltinInitialize the command to work with a repository.- Overrides:
initin classTextBuiltin- Parameters:
repository- the opened repository that the command should work on.gitDir- value of the--git-dircommand line option, ifrepositoryis null.
-
run
protected void run()
Description copied from class:TextBuiltinPerform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[]).- Specified by:
runin 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:
RevisionSyntaxExceptionAmbiguousObjectExceptionIncorrectObjectTypeExceptionjava.io.IOException
-
-