| Modifier and Type | Field and Description |
|---|---|
| private final MergeToolConfig | |
| private final FS | |
| private final File | |
| private final Map | |
| private final Repository | |
| private final Map | |
| private final File |
| Access | Constructor and Description |
|---|---|
| public | MergeTools(Repository
the repository repo)Creates the external merge-tools manager for given repository. |
| public | MergeTools(StoredConfig
the git configuration config)Creates the external diff-tools manager for given configuration. |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private FileElement | |
| public File | Returns: the created temporary directory if (mergetol.writeToTemp == true) or null if not configured or false.Create temporary directory. |
| 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 the 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 ExternalMergeTool | |
| public Set | |
| public Map | |
| public boolean | Returns: is interactive (config prompt enabled) ?Is interactive merge (prompt enabled) ? |
| private void | |
| 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, FileElement The file for the result. mergedFile, FileElement The base version of the file. May be null. baseFile, File The tmepDir used for the files. May be null. tempDir, 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, 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)Merge two versions of a file with optional base file. |
| public FS. | Returns: the execution result from toolthe local file element localFile, FileElement the remote file element remoteFile, FileElement the merged file element mergedFile, FileElement the base file element (can be null) baseFile, File the temporary directory (needed for backup and auto-remove,
can be null) tempDir, ExternalMergeTool the selected tool tool)Merge two versions of a file with optional base file. |
| private Map | |
| private Map |
| config | back to summary |
|---|---|
| private final MergeToolConfig 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, ExternalMergeTool> predefinedTools | |
| repo | back to summary |
|---|---|
| private final Repository repo | |
| userDefinedTools | back to summary |
|---|---|
| private final Map<String, ExternalMergeTool> userDefinedTools | |
| workTree | back to summary |
|---|---|
| private final File workTree | |
| MergeTools | back to summary |
|---|---|
| public MergeTools(Repository repo) Creates the external merge-tools manager for given repository.
| |
| MergeTools | back to summary |
|---|---|
| public MergeTools(StoredConfig config) Creates the external diff-tools manager for given configuration.
| |
| MergeTools | back to summary |
|---|---|
| private MergeTools(Repository repo, StoredConfig config) | |
| createBackupFile | back to summary |
|---|---|
| private FileElement createBackupFile(FileElement from, File toParentDir) throws IOException | |
| createTempDirectory | back to summary |
|---|---|
| public File createTempDirectory() throws IOException Create temporary directory.
| |
| getAllToolNames | back to summary |
|---|---|
| public Set Get all tool names. | |
| getDefaultToolName | back to summary |
|---|---|
| public String getDefaultToolName(boolean gui) Get the 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 ExternalMergeTool 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
| |
| isInteractive | back to summary |
|---|---|
| public boolean isInteractive() Is interactive merge (prompt enabled) ?
| |
| keepBackupFile | back to summary |
|---|---|
| private void keepBackupFile(String mergedFilePath, FileElement backup) throws IOException | |
| merge | back to summary |
|---|---|
| public Optional Merge two versions of a file with optional base file.
| |
| merge | back to summary |
|---|---|
| public FS. Merge two versions of a file with optional base file.
| |
| setupPredefinedTools | back to summary |
|---|---|
| private Map | |
| setupUserDefinedTools | back to summary |
|---|---|
| private Map | |