You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/XMLDIffWithVSCode.nexus
+9-13Lines changed: 9 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,8 @@ This document describes how to use XMLDiff with Visual Studio Code.
11
11
[*] VSCode extension [url=https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave]Run on Save[/url] by [url=https://marketplace.visualstudio.com/publishers/emeraldwalk]emeraldwalk[/url]
12
12
[/list]
13
13
[size=3][u][b]Steps[/b][/u][/size]
14
-
[olist]
14
+
[list=1]
15
15
[*] Prepare a folders structure like the following:
16
-
[/olist]
17
16
[code]
18
17
RootExtensionFolder
19
18
│ XMLDiffAndPatch
@@ -26,14 +25,14 @@ This document describes how to use XMLDiff with Visual Studio Code.
26
25
│ md.modified
27
26
│ md.original
28
27
[/code]
29
-
[olist]
30
28
[*] You can skip creation [b]*.original[/b] folders, if you will use the [b]extracted[/b] files folder.
31
29
[*] Copy the [url=https://github.com/chemodun/X4-XMLDiffAndPatch/raw/main///forVSCode/RunXMLDiff.bat]RunXMLDiff.bat[/url] file to the root of your project.
32
30
[*] Copy the [b]XMLDiff.exe[/b] file to the [b]XMLDiffAndPatch[/b] folder in the root of your project.
33
31
[*] Install the VSCode extension [url=https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave]Run on Save[/url] by [url=https://marketplace.visualstudio.com/publishers/emeraldwalk]emeraldwalk[/url]
34
32
[*] Open the settings of the extension by pressing [b]Ctrl + ,[/b] and search for [b]runOnSave.commands[/b]
35
33
[*] Add the following configuration to the settings:
36
-
[/olist] 7.1 In case of not to use the "Extracted" files folder, i.e. with [b]*.original[/b] folders:
34
+
[list=1]
35
+
[*]In case of not to use the "Extracted" files folder, i.e. with [b]*.original[/b] folders:
37
36
38
37
[code]
39
38
"commands": [
@@ -44,7 +43,7 @@ This document describes how to use XMLDiff with Visual Studio Code.
44
43
]
45
44
[/code]
46
45
47
-
7.2. With the [b]extracted[/b] folder, which is outside the project folder:
46
+
[*]With the [b]extracted[/b] folder, which is outside the project folder:
48
47
49
48
[code]
50
49
"commands": [
@@ -56,9 +55,9 @@ This document describes how to use XMLDiff with Visual Studio Code.
56
55
[/code]
57
56
58
57
Take in account that with the [b]extracted[/b] folder you still can use the [b]*.original[/b] folders for original files. It will be used first, if they exist, otherwise the script will use the [b]extracted[/b] folder.
59
-
[olist]
58
+
[/list]
60
59
[*] Save the settings and close the settings tab.
61
-
[/olist]
60
+
[/list]
62
61
Now you can modify the [b]*.modified[/b] files and the [b]RunXMLDiff.bat[/b] will be executed automatically on save.
63
62
64
63
You can check an output in the [b]OUTPUT[/b] tab in the VSCode, selecting the [b]Run on Save[/b] item in the dropdown list.
[*] [b]Extract Type and Filename[/b]: The script extracts the type (e.g., [b]aiscript[/b] or [b]md[/b]) and filename from the modified file path.
91
90
[*] [b]Determine Target File Path[/b]: The script constructs the target file path by removing [b].modified[/b] from the modified file path.
92
91
[*] [b]Determine Original File Path[/b]:
93
-
[/olist][list][list]
94
92
[*] If the [b]OriginalFilesPath[/b] is provided, the original file path is constructed as [b]OriginalFilesPath\type\filename[/b].
95
93
[*] If the [b]OriginalFilesPath[/b] is not provided, the original file path is constructed by replacing [b].modified[/b] with [b].original[/b] in the modified file path.
96
-
[/list]
97
-
[/list]4. [b]Check Existence[/b]:
98
-
[list][list]
94
+
[*] [b]Check Existence[/b]:
99
95
[*] The script checks for the existence of [b]XMLDiff.exe[/b], the modified file, the original file, and the target file directory.
96
+
[*][b]Run XMLDiff[/b]: If all checks pass, the script runs [b]XMLDiff.exe[/b] with the appropriate parameters to generate the diff file.
100
97
[/list]
101
-
[/list]5. [b]Run XMLDiff[/b]: If all checks pass, the script runs [b]XMLDiff.exe[/b] with the appropriate parameters to generate the diff file.
0 commit comments