| Modifier and Type | Field and Description |
|---|---|
| private final DiffToolConfig | |
| private final FS | |
| private final File | |
| private final Map | |
| private final Repository | |
| private final Map | |
| private final File |
| Access | Constructor and Description |
|---|---|
| public | DiffTools(Repository
the repository repo)Creates the external diff-tools manager for given repository. |
| public | DiffTools(StoredConfig
the git configuration config)Creates the external merge-tools manager for given configuration. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Optional | Returns: the optional result of executing the tool if it was executedThe local/left version of the file. localFile, FileElement The remote/right version of the file. remoteFile, Optional<String> Optionally the name of the tool to use. If not given the
default tool will be used. toolName, BooleanTriState Optionally a flag whether to prompt the user before compare.
If not given the default will be used. prompt, boolean A flag whether to prefer a gui tool. gui, BooleanTriState Optionally a flag whether to trust the exit code of the tool.
If not given the default will be used. trustExitCode, PromptContinueHandler The handler to use when needing to prompt the user if he wants
to continue. promptHandler, InformNoToolHandler The handler to use when needing to inform the user, that no
tool is configured. noToolHandler)Compare two versions of a file. |
| public FS. | Returns: the execution result from toolthe local file element localFile, FileElement the remote file element remoteFile, ExternalDiffTool the selected tool tool, boolean the "trust exit code" option trustExitCode)Compare two versions of a file. |
| public Set | Returns: the all tool names (default or available tool name is the first in the set)Get all tool names. |
| public String | Returns: the default tool nameuse the diff.guitool setting ? gui)Get default (gui-)tool name. |
| public Optional | Returns: name of the difftool if setpath to the node in repository to parse git attributes for path)Provides |
| public String | Returns: the name of first available predefined tool or nullGet first available tool name. |
| public Set | Returns: set of predefined available toolsChecks the availability of the predefined tools in the system. |
| public Set | |
| public Map | Returns: the predefined tools with optionally checked availability (long running operation)true: for checking if tools can be executed; ATTENTION: this
check took some time, do not execute often (store the map for
other actions); false: availability is NOT checked:
isAvailable() returns default false is this case! checkAvailability)Get predefined tools map. |
| private ExternalDiffTool | |
| public Set | |
| public Map | |
| public boolean | Returns: is interactive (config prompt enabled) ?Is interactive diff (prompt enabled) ? |
| private static Map | |
| private Map |
| config | back to summary |
|---|---|
| private final DiffToolConfig config | |
| fs | back to summary |
|---|---|
| private final FS fs | |
| gitDir | back to summary |
|---|---|
| private final File gitDir | |
| predefinedTools | back to summary |
|---|---|
| private final Map<String, ExternalDiffTool> predefinedTools | |
| repo | back to summary |
|---|---|
| private final Repository repo | |
| userDefinedTools | back to summary |
|---|---|
| private final Map<String, ExternalDiffTool> userDefinedTools | |
| workTree | back to summary |
|---|---|
| private final File workTree | |
| DiffTools | back to summary |
|---|---|
| public DiffTools(Repository repo) Creates the external diff-tools manager for given repository.
| |
| DiffTools | back to summary |
|---|---|
| public DiffTools(StoredConfig config) Creates the external merge-tools manager for given configuration.
| |
| DiffTools | back to summary |
|---|---|
| private DiffTools(Repository repo, StoredConfig config) | |
| compare | back to summary |
|---|---|
| public Optional Compare two versions of a file.
| |
| compare | back to summary |
|---|---|
| public FS. Compare two versions of a file.
| |
| getAllToolNames | back to summary |
|---|---|
| public Set Get all tool names. | |
| getDefaultToolName | back to summary |
|---|---|
| public String getDefaultToolName(boolean gui) Get default (gui-)tool name.
| |
| getExternalToolFromAttributes | back to summary |
|---|---|
| public Optional Provides
| |
| getFirstAvailableTool | back to summary |
|---|---|
| public String getFirstAvailableTool() Get first available tool name.
| |
| getPredefinedAvailableTools | back to summary |
|---|---|
| public Set Checks the availability of the predefined tools in the system. | |
| getPredefinedToolNames | back to summary |
|---|---|
| public Set Get predefined tool names. | |
| getPredefinedTools | back to summary |
|---|---|
| public Map Get predefined tools map.
| |
| getTool | back to summary |
|---|---|
| private ExternalDiffTool getTool(final String name) | |
| getUserDefinedToolNames | back to summary |
|---|---|
| public Set Get user defined tool names. | |
| getUserDefinedTools | back to summary |
|---|---|
| public Map Get user defined tools map.
| |
| isInteractive | back to summary |
|---|---|
| public boolean isInteractive() Is interactive diff (prompt enabled) ?
| |
| setupPredefinedTools | back to summary |
|---|---|
| private static Map | |
| setupUserDefinedTools | back to summary |
|---|---|
| private Map | |