Skip to content

Commit 683ece2

Browse files
authored
Add support for optional CreateNoWindow (#619)
1 parent 6481988 commit 683ece2

32 files changed

+106
-18
lines changed

docs/diff-tool.custom.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ var resolvedTool = DiffTools.AddTool(
1818
isMdi: false,
1919
supportsText: true,
2020
requiresTarget: true,
21+
createNoWindow: false,
2122
launchArguments: new(
2223
Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"",
2324
Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\""),
2425
exePath: diffToolPath,
2526
binaryExtensions: [".jpg"])!;
2627
```
27-
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L15-L29' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddTool' title='Start of snippet'>anchor</a></sup>
28+
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L15-L30' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddTool' title='Start of snippet'>anchor</a></sup>
2829
<!-- endSnippet -->
2930

3031
Add a tool based on existing resolved tool:
@@ -39,7 +40,7 @@ var resolvedTool = DiffTools.AddToolBasedOn(
3940
Left: (temp, target) => $"\"custom args \"{target}\" \"{temp}\"",
4041
Right: (temp, target) => $"\"custom args \"{temp}\" \"{target}\""))!;
4142
```
42-
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L82-L91' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddToolBasedOn' title='Start of snippet'>anchor</a></sup>
43+
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L85-L94' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddToolBasedOn' title='Start of snippet'>anchor</a></sup>
4344
<!-- endSnippet -->
4445

4546

@@ -69,7 +70,7 @@ var resolvedTool = DiffTools.AddToolBasedOn(
6970

7071
await DiffRunner.LaunchAsync(resolvedTool!, "PathToTempFile", "PathToTargetFile");
7172
```
72-
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L102-L113' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddToolAndLaunch' title='Start of snippet'>anchor</a></sup>
73+
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L105-L116' title='Snippet source file'>snippet source</a> | <a href='#snippet-AddToolAndLaunch' title='Start of snippet'>anchor</a></sup>
7374
<!-- endSnippet -->
7475

7576

docs/diff-tool.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
145145
* Is MDI: False
146146
* Supports auto-refresh: True
147147
* Supports text files: True
148+
* Create no window: False
148149
* Environment variable for custom install location: `DiffEngine_BeyondCompare`
149150
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .pdf, .png, .rtf, .svg, .tif, .tiff
150151

@@ -186,6 +187,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
186187
* Is MDI: False
187188
* Supports auto-refresh: True
188189
* Supports text files: True
190+
* Create no window: False
189191
* Environment variable for custom install location: `DiffEngine_DeltaWalker`
190192
* Supported binaries: .bmp, .bz2, .doc, .docx, .ear, .gif, .gz, .htm, .html, .ico, .j2k, .jar, .jp2, .jpg, .pbm, .pct, .pdf, .pgm, .pic, .pict, .png, .pnm, .ppm, .ppt, .psd, .rtf, .svg, .tar, .tbz2, .tgz, .tif, .xls, .xlsx, .zip
191193

@@ -217,6 +219,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
217219
* Is MDI: False
218220
* Supports auto-refresh: True
219221
* Supports text files: True
222+
* Create no window: False
220223
* Environment variable for custom install location: `DiffEngine_Diffinity`
221224
* Supported binaries: .svg
222225

@@ -236,6 +239,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
236239
* Is MDI: False
237240
* Supports auto-refresh: True
238241
* Supports text files: True
242+
* Create no window: False
239243
* Environment variable for custom install location: `DiffEngine_ExamDiff`
240244
* Supported binaries: .svg
241245

@@ -261,6 +265,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
261265
* Is MDI: False
262266
* Supports auto-refresh: False
263267
* Supports text files: True
268+
* Create no window: False
264269
* Environment variable for custom install location: `DiffEngine_Guiffy`
265270
* Supported binaries: .bmp, .gif, .jpeg, .jpg, .png, .svg, .wbmp
266271

@@ -295,6 +300,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
295300
* Is MDI: False
296301
* Supports auto-refresh: True
297302
* Supports text files: True
303+
* Create no window: False
298304
* Environment variable for custom install location: `DiffEngine_Kaleidoscope`
299305
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .svg, .tif, .tiff
300306

@@ -311,6 +317,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
311317
* Is MDI: False
312318
* Supports auto-refresh: False
313319
* Supports text files: True
320+
* Create no window: False
314321
* Environment variable for custom install location: `DiffEngine_KDiff3`
315322
* Supported binaries: .svg
316323

@@ -345,6 +352,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
345352
* Is MDI: False
346353
* Supports auto-refresh: False
347354
* Supports text files: True
355+
* Create no window: False
348356
* Environment variable for custom install location: `DiffEngine_Neovim`
349357
* Supported binaries: .svg
350358

@@ -379,6 +387,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
379387
* Is MDI: False
380388
* Supports auto-refresh: False
381389
* Supports text files: True
390+
* Create no window: False
382391
* Environment variable for custom install location: `DiffEngine_P4Merge`
383392
* Supported binaries: .bmp, .gif, .jpeg, .jpg, .pbm, .pgm, .png, .ppm, .svg, .tif, .tiff, .xbm, .xpm
384393

@@ -419,6 +428,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
419428
* Is MDI: False
420429
* Supports auto-refresh: True
421430
* Supports text files: True
431+
* Create no window: False
422432
* Environment variable for custom install location: `DiffEngine_Rider`
423433
* Supported binaries: .svg
424434

@@ -460,6 +470,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
460470
* Is MDI: False
461471
* Supports auto-refresh: False
462472
* Supports text files: True
473+
* Create no window: False
463474
* Environment variable for custom install location: `DiffEngine_TkDiff`
464475
* Supported binaries: .svg
465476

@@ -477,6 +488,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
477488
* Is MDI: False
478489
* Supports auto-refresh: False
479490
* Supports text files: False
491+
* Create no window: False
480492
* Environment variable for custom install location: `DiffEngine_TortoiseGitIDiff`
481493
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .tif, .tiff
482494

@@ -496,6 +508,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
496508
* Is MDI: False
497509
* Supports auto-refresh: False
498510
* Supports text files: True
511+
* Create no window: False
499512
* Environment variable for custom install location: `DiffEngine_TortoiseGitMerge`
500513
* Supported binaries: .svg
501514

@@ -515,6 +528,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
515528
* Is MDI: False
516529
* Supports auto-refresh: False
517530
* Supports text files: False
531+
* Create no window: False
518532
* Environment variable for custom install location: `DiffEngine_TortoiseIDiff`
519533
* Supported binaries: .bmp, .gif, .ico, .jpeg, .jpg, .png, .tif, .tiff
520534

@@ -534,6 +548,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
534548
* Is MDI: False
535549
* Supports auto-refresh: False
536550
* Supports text files: True
551+
* Create no window: False
537552
* Environment variable for custom install location: `DiffEngine_TortoiseMerge`
538553
* Supported binaries: .svg
539554

@@ -553,6 +568,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
553568
* Is MDI: False
554569
* Supports auto-refresh: True
555570
* Supports text files: True
571+
* Create no window: False
556572
* Environment variable for custom install location: `DiffEngine_Vim`
557573
* Supported binaries: .svg
558574

@@ -588,6 +604,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
588604
* Is MDI: False
589605
* Supports auto-refresh: True
590606
* Supports text files: True
607+
* Create no window: False
591608
* Environment variable for custom install location: `DiffEngine_WinMerge`
592609
* Supported binaries: .bmp, .bw, .cut, .dds, .exr, .g3, .gif, .hdp, .hdr, .ico, .iff, .j2c, .j2k, .jif, .jng, .jp2, .jpe, .jpeg, .jpg, .jxr, .koa, .lbm, .mng, .pbm, .pcd, .pct, .pcx, .pfm, .pgm, .pic, .pict, .png, .ppm, .psd, .ras, .rgb, .rgba, .sgi, .svg, .targa, .tga, .tif, .tiff, .wap, .wbm, .wbmp, .wdp, .webp, .xbm, .xpm
593610

@@ -620,6 +637,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
620637
* Is MDI: True
621638
* Supports auto-refresh: True
622639
* Supports text files: True
640+
* Create no window: False
623641
* Environment variable for custom install location: `DiffEngine_AraxisMerge`
624642
* Supported binaries: .bmp, .dib, .emf, .gif, .j2c, .j2k, .jif, .jp2, .jpc, .jpeg, .jpg, .jpx, .pbm, .pcx, .pgm, .png, .ppm, .ras, .svg, .tga, .tif, .tiff, .wmf
625643

@@ -654,6 +672,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
654672
* Is MDI: True
655673
* Supports auto-refresh: False
656674
* Supports text files: True
675+
* Create no window: False
657676
* Environment variable for custom install location: `DiffEngine_Meld`
658677
* Supported binaries: .svg
659678

@@ -693,6 +712,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
693712
* Is MDI: True
694713
* Supports auto-refresh: False
695714
* Supports text files: True
715+
* Create no window: False
696716
* Environment variable for custom install location: `DiffEngine_SublimeMerge`
697717
* Supported binaries: .svg
698718

@@ -731,6 +751,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
731751
* Is MDI: True
732752
* Supports auto-refresh: True
733753
* Supports text files: True
754+
* Create no window: False
734755
* Environment variable for custom install location: `DiffEngine_VisualStudio`
735756
* Supported binaries: .svg
736757

@@ -759,6 +780,7 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
759780
* Is MDI: True
760781
* Supports auto-refresh: True
761782
* Supports text files: True
783+
* Create no window: False
762784
* Environment variable for custom install location: `DiffEngine_VisualStudioCode`
763785
* Supported binaries: .svg
764786

docs/diff-tool.order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ For example `VisualStudio,Meld` will result in VisualStudio then Meld then all o
5151
```cs
5252
DiffTools.UseOrder(DiffTool.VisualStudio, DiffTool.AraxisMerge);
5353
```
54-
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L174-L178' title='Snippet source file'>snippet source</a> | <a href='#snippet-UseOrder' title='Start of snippet'>anchor</a></sup>
54+
<sup><a href='/src/DiffEngine.Tests/DiffToolsTest.cs#L177-L181' title='Snippet source file'>snippet source</a> | <a href='#snippet-UseOrder' title='Start of snippet'>anchor</a></sup>
5555
<!-- endSnippet -->

src/DiffEngine.Tests/DefinitionsTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ static void AddTool(StreamWriter writer, Definition tool)
124124
* Is MDI: {tool.IsMdi}
125125
* Supports auto-refresh: {tool.AutoRefresh}
126126
* Supports text files: {tool.SupportsText}
127+
* Create no window: {tool.CreateNoWindow}
127128
* Environment variable for custom install location: `DiffEngine_{tool.Tool}`
128129
""");
129130

130131
if (tool.BinaryExtensions.Length != 0)
131132
{
132-
writer.WriteLine($" * Supported binaries: {string.Join(", ", tool.BinaryExtensions.OrderBy(_=>_))}");
133+
writer.WriteLine($" * Supported binaries: {string.Join(", ", tool.BinaryExtensions.OrderBy(_ => _))}");
133134
}
134135

135136
if (tool.Notes != null)

src/DiffEngine.Tests/DiffRunnerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ static DiffRunnerTests() =>
187187
autoRefresh: true,
188188
isMdi: false,
189189
supportsText: true,
190+
createNoWindow: false,
190191
requiresTarget: true,
191192
launchArguments: new(
192193
Left: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\"",

src/DiffEngine.Tests/DiffToolsTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public void AddTool()
2020
isMdi: false,
2121
supportsText: true,
2222
requiresTarget: true,
23+
createNoWindow: false,
2324
launchArguments: new(
2425
Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"",
2526
Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\""),
@@ -44,6 +45,7 @@ public void OrderShouldNotMessWithAddTool()
4445
isMdi: false,
4546
supportsText: true,
4647
requiresTarget: true,
48+
createNoWindow: false,
4749
launchArguments: new(
4850
Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"",
4951
Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\""),
@@ -65,6 +67,7 @@ public void TextConvention()
6567
isMdi: false,
6668
supportsText: true,
6769
requiresTarget: true,
70+
createNoWindow: false,
6871
launchArguments: new(
6972
Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"",
7073
Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\""),

0 commit comments

Comments
 (0)