Top Description Fields Constructors Methods
org.eclipse.jgit.internal.diffmergetool

public Class UserDefinedDiffTool

extends Object
implements ExternalDiffTool
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool
Known Direct Subclasses
org.eclipse.jgit.internal.diffmergetool.UserDefinedMergeTool, org.eclipse.jgit.internal.diffmergetool.PreDefinedDiffTool

The user-defined diff tool.

Field Summary

Modifier and TypeField and Description
private boolean
private final String
cmd

the diff tool command

private final String
name

the diff tool name

private String
path

the diff tool path

Constructor Summary

AccessConstructor and Description
public
UserDefinedDiffTool(String
the name
name
,
String
the path
path
,
String
the command
cmd
)

Creates the diff tool

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the diff tool command
getCommand
()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getCommand.

The command of the diff tool.

public String

Returns:

the diff tool name
getName
()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getName.

Get tool name

public String

Returns:

the diff tool path
getPath
()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getPath.

The path of the diff tool.

public boolean

Returns:

availability of the tool: true if tool can be executed and false if not
isAvailable
()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.isAvailable.

Whether tool is available

public void
setAvailable(boolean
true if tool can be found and false if not
available
)

Set whether tool is available

public void
setPath(String
the new diff tool path
path
)

Overrides the path for the given tool.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

availableback to summary
private boolean available
cmdback to summary
private final String cmd

the diff tool command

nameback to summary
private final String name

the diff tool name

pathback to summary
private String path

the diff tool path

Constructor Detail

UserDefinedDiffToolback to summary
public UserDefinedDiffTool(String name, String path, String cmd)

Creates the diff tool

Parameters
name:String

the name

path:String

the path

cmd:String

the command

Method Detail

getCommandback to summary
public String getCommand()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.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 of getPath() and can sometimes include tool parameters.

Returns:String

the diff tool command

Annotations
@Override
See Also
https://git-scm.com/docs/git-difftool
getNameback to summary
public String getName()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getName.

Doc from org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getName.

Get tool name

Returns:String

the diff tool name

Annotations
@Override
getPathback to summary
public String getPath()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.getPath.

The path of the diff tool.

The path to a pre-defined external diff tool can be overridden by specifying difftool.<tool>.path in a configuration file.

For a user defined diff tool (that does not override a pre-defined diff tool), the path is ignored when invoking the tool.

Returns:String

the diff tool path

Annotations
@Override
See Also
https://git-scm.com/docs/git-difftool
isAvailableback to summary
public boolean isAvailable()

Implements org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.isAvailable.

Doc from org.eclipse.jgit.internal.diffmergetool.ExternalDiffTool.isAvailable.

Whether tool is available

Returns:boolean

availability of the tool: true if tool can be executed and false if not

Annotations
@Override
setAvailableback to summary
public void setAvailable(boolean available)

Set whether tool is available

Parameters
available:boolean

true if tool can be found and false if not

setPathback to summary
public void setPath(String path)

Overrides the path for the given tool. Equivalent to setting difftool.<tool>.path.

Parameters
path:String

the new diff tool path

See Also
https://git-scm.com/docs/git-difftool