Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/diff-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,45 @@ DiffTools.UseOrder(DiffTool.AraxisMerge);
* `/Applications/Araxis Merge.app/Contents/Utilities/compare`
* `%PATH%compare`

### [CodeCompare](https://www.devart.com/codecompare/)

* Cost: Free and Paid
* Is MDI: True
* Supports auto-refresh: False
* Supports text files: True
* Use shell execute: True
* Create no window: False
* Environment variable for custom install location: `DiffEngine_CodeCompare`

#### Tool order:

Use [tool order](diff-tool.order.md) to prioritise CodeCompare over other tools.

```
DiffTools.UseOrder(DiffTool.CodeCompare);
```

#### Notes:

* [Command line reference](https://docs.devart.com/code-compare/using-command-line/comparing-via-command-line.html)
* Launched with `/environment=standalone`, so a diff always opens in Code Compare rather than in a Visual Studio with the Code Compare extension, and never stops to ask which. [Environment on comparison opening](https://docs.devart.com/code-compare/using-command-line/choosing-environment-on-comparison-opening.html)

#### Windows settings:

* Example target on left arguments:
```
/environment=standalone "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
/environment=standalone "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%ProgramFiles%\Devart\Code Compare\CodeCompare.exe`
* `%ProgramW6432%\Devart\Code Compare\CodeCompare.exe`
* `%ProgramFiles(x86)%\Devart\Code Compare\CodeCompare.exe`
* `%PATH%CodeCompare.exe`

### [Cursor](https://cursor.com)

* Cost: Free and Paid
Expand Down
1 change: 1 addition & 0 deletions docs/diff-tool.order.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ To change this file edit the source file and then run MarkdownSnippets.
* **[AraxisMerge](/docs/diff-tool.md#araxismerge)** Windows/OSX (Cost: Paid)
* **[Meld](/docs/diff-tool.md#meld)** Windows/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Windows/OSX/Linux (Cost: Paid)
* **[CodeCompare](/docs/diff-tool.md#codecompare)** Windows (Cost: Free and Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Windows/OSX/Linux (Cost: Free)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Windows (Cost: Paid and free options)
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ DiffEngine manages launching and cleanup of diff tools. It is designed to be use

* **[AraxisMerge](/docs/diff-tool.md#araxismerge)** Windows/OSX (Cost: Paid)<!-- include: diffToolList. path: /src/DiffEngine.Tests/diffToolList.include.md -->
* **[BeyondCompare](/docs/diff-tool.md#beyondcompare)** Windows/OSX/Linux (Cost: Paid)
* **[CodeCompare](/docs/diff-tool.md#codecompare)** Windows (Cost: Free and Paid)
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
* **[DeltaWalker](/docs/diff-tool.md#deltawalker)** Windows/OSX (Cost: Paid)
* **[DiffEngineViewer](/docs/diff-tool.md#diffengineviewer)** Windows/OSX/Linux (Cost: Free)
Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine.Tests/defaultOrder.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* **[AraxisMerge](/docs/diff-tool.md#araxismerge)** Windows/OSX (Cost: Paid)
* **[Meld](/docs/diff-tool.md#meld)** Windows/OSX/Linux (Cost: Free)
* **[SublimeMerge](/docs/diff-tool.md#sublimemerge)** Windows/OSX/Linux (Cost: Paid)
* **[CodeCompare](/docs/diff-tool.md#codecompare)** Windows (Cost: Free and Paid)
* **[VisualStudioCode](/docs/diff-tool.md#visualstudiocode)** Windows/OSX/Linux (Cost: Free)
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Windows (Cost: Paid and free options)
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine.Tests/diffToolList.include.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* **[AraxisMerge](/docs/diff-tool.md#araxismerge)** Windows/OSX (Cost: Paid)
* **[BeyondCompare](/docs/diff-tool.md#beyondcompare)** Windows/OSX/Linux (Cost: Paid)
* **[CodeCompare](/docs/diff-tool.md#codecompare)** Windows (Cost: Free and Paid)
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
* **[DeltaWalker](/docs/diff-tool.md#deltawalker)** Windows/OSX (Cost: Paid)
* **[DiffEngineViewer](/docs/diff-tool.md#diffengineviewer)** Windows/OSX/Linux (Cost: Free)
Expand Down
39 changes: 39 additions & 0 deletions src/DiffEngine.Tests/diffTools.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,45 @@ DiffTools.UseOrder(DiffTool.AraxisMerge);
* `/Applications/Araxis Merge.app/Contents/Utilities/compare`
* `%PATH%compare`

### [CodeCompare](https://www.devart.com/codecompare/)

* Cost: Free and Paid
* Is MDI: True
* Supports auto-refresh: False
* Supports text files: True
* Use shell execute: True
* Create no window: False
* Environment variable for custom install location: `DiffEngine_CodeCompare`

#### Tool order:

Use [tool order](diff-tool.order.md) to prioritise CodeCompare over other tools.

```
DiffTools.UseOrder(DiffTool.CodeCompare);
```

#### Notes:

* [Command line reference](https://docs.devart.com/code-compare/using-command-line/comparing-via-command-line.html)
* Launched with `/environment=standalone`, so a diff always opens in Code Compare rather than in a Visual Studio with the Code Compare extension, and never stops to ask which. [Environment on comparison opening](https://docs.devart.com/code-compare/using-command-line/choosing-environment-on-comparison-opening.html)

#### Windows settings:

* Example target on left arguments:
```
/environment=standalone "targetFile.txt" "tempFile.txt"
```
* Example target on right arguments:
```
/environment=standalone "tempFile.txt" "targetFile.txt"
```
* Scanned paths:
* `%ProgramFiles%\Devart\Code Compare\CodeCompare.exe`
* `%ProgramW6432%\Devart\Code Compare\CodeCompare.exe`
* `%ProgramFiles(x86)%\Devart\Code Compare\CodeCompare.exe`
* `%PATH%CodeCompare.exe`

### [Cursor](https://cursor.com)

* Cost: Free and Paid
Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine/Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static Definitions() =>
Implementation.AraxisMerge(),
Implementation.Meld(),
Implementation.SublimeMerge(),
Implementation.CodeCompare(),
Implementation.VisualStudioCode(),
Implementation.VisualStudio(),
Implementation.Cursor(),
Expand Down
1 change: 1 addition & 0 deletions src/DiffEngine/DiffTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public enum DiffTool
AraxisMerge,
Meld,
SublimeMerge,
CodeCompare,
VisualStudioCode,
VisualStudio,
Cursor,
Expand Down
36 changes: 36 additions & 0 deletions src/DiffEngine/Implementation/CodeCompare.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace DiffEngine;

static partial class Implementation
{
public static Definition CodeCompare()
{
// Left to itself Code Compare picks where a comparison opens: the Visual Studio a file
// belongs to a project of, a running Code Compare, or any running Visual Studio, and with
// more than one of them open it stops and asks which. A test run has the verified file in
// a project, so the diff would go into Visual Studio, which is a tool of its own here
var launchArguments = new LaunchArguments(
Left: (temp, target) => $"/environment=standalone \"{target}\" \"{temp}\"",
Right: (temp, target) => $"/environment=standalone \"{temp}\" \"{target}\"");

return new(
Tool: DiffTool.CodeCompare,
Url: "https://www.devart.com/codecompare/",
AutoRefresh: false,
// A comparison opens as a tab in whichever Code Compare is already running
IsMdi: true,
SupportsText: true,
UseShellExecute: true,
RequiresTarget: true,
Cost: "Free and Paid",
BinaryExtensions: [],
OsSupport: new(
Windows: new(
"CodeCompare.exe",
launchArguments,
@"%ProgramFiles%\Devart\Code Compare\")),
Notes: """
* [Command line reference](https://docs.devart.com/code-compare/using-command-line/comparing-via-command-line.html)
* Launched with `/environment=standalone`, so a diff always opens in Code Compare rather than in a Visual Studio with the Code Compare extension, and never stops to ask which. [Environment on comparison opening](https://docs.devart.com/code-compare/using-command-line/choosing-environment-on-comparison-opening.html)
""");
}
}
Loading