Skip to content

Commit 40ded4b

Browse files
authored
Merge pull request #11229 from pradeep-patil-mdx/ccr/207-text-diff-viewer
[CCR-207] Web based file differences viewer
2 parents 2baa48c + 8537651 commit 40ded4b

9 files changed

Lines changed: 61 additions & 55 deletions

File tree

content/en/docs/refguide/installation/system-requirements.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,6 @@ For more information on ports and modifying Studio Pro's default ports, see [Con
126126

127127
For information on how to ensure the smooth operation of Mendix AI Assistance (Maia), see the [Network Configuration Requirements](/refguide/mendix-ai-assistance/#maia-network-requirement) section in *Mendix AI Assistance (Maia)*.
128128

129-
### File Comparison
130-
131-
{{% alert color="info" %}}
132-
Comparing files on disk with the original is currently not supported on macOS.
133-
{{% /alert %}}
134-
135-
By default, Studio Pro points to an executable shipped with TortoiseGit for file comparison. To customize this, navigate to **Preferences** > **Version control** > **General** > **File comparison** > **Executable** and choose your preferred tool.
136-
137-
The default path for the binary when installing Studio Pro on a new device is `C:\Program Files\TortoiseGit\bin\TortoiseGitMerge.exe`.
138-
139-
You can download the latest version of TortoiseGitMerge from the [TortoiseGit](https://tortoisegit.org/download/) website.
140129

141130
### File Locations
142131

content/en/docs/refguide/modeling/menus/edit-menu/preferences-dialog.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,6 @@ This setting defines the default response to the question whether to automatical
152152

153153
### General
154154

155-
#### Executable
156-
157-
This is the path and name of the program that is used to view the details of file changes in the [commit dialog box](/refguide/commit-dialog/).
158-
159-
For example, this is how to set up file comparison for Visual Studio Code:
160-
161-
```text
162-
{path to VS Code}/Code.exe --wait --diff "{0}" "{1}"
163-
```
164-
165-
#### Argument Pattern
166-
167-
This is the pattern from which the arguments are derived that are passed to the file comparison program. The following two placeholders can be used in this pattern:
168-
169-
* `{0}` – this is replaced with the name of the original file before the arguments are passed to the file comparison program
170-
* `{1}` – this is replaced with the name of the changed file before the arguments are passed to the file comparison program
171-
172155
#### History {#history-pane}
173156

174157
Select this option to use the blocking **History** dialog instead of the non-blocking, searchable History pane.

content/en/docs/refguide/modeling/menus/version-control-menu/history-dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The search bar within the tab can be used to filter the list of documents.
9292

9393
### Disk Changes
9494

95-
This tab shows a list of the files that were changed on disk. You can see whether files were added, deleted or modified.
95+
This tab shows a list of the files that were changed on disk. You can see whether files were added, deleted or modified. To compare a modified file with its committed version, use **Compare with original** in the [Changes pane](/refguide/changes-pane/), which opens the [File Differences Viewer](/refguide/file-diff-viewer/).
9696

9797
The search bar within the tab can be used to filter the list of files.
9898

content/en/docs/refguide/modeling/menus/view-menu/changes-pane.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ The toolbar at this level contains the following buttons:
8383
* **Go to** – takes you directly to the changed element
8484
* **Show purely visual changes** – shows visual changes, such as dragging an entity to a new location in the domain model
8585

86+
For text-based properties, you can double-click a property row to open the [File Differences Viewer](/refguide/file-diff-viewer/), which shows a detailed side-by-side comparison of the old and new values. To compare file-level changes at the top level, double-click a file row or right-click and select **Compare with original**.
87+
88+
8689
The left side of the grid contains the following columns:
8790

8891
* **Element** – the name of the modified element
@@ -146,5 +149,6 @@ The left and right panes will contain the same information as in [Zoomed-In Leve
146149

147150
* [Studio Pro Overview](/refguide/studio-pro-overview/)
148151
* [Version Control](/refguide/version-control/)
152+
* [File Differences Viewer](/refguide/file-diff-viewer/)
149153
* [Comparison Pane](/refguide/comparison-pane/)
150154
* [Comparing Revisions](/refguide/comparing-revisions/)

content/en/docs/refguide/modeling/menus/view-menu/comparison-pane.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ Property paths are consolidated into a tree view. Grey rows represent intermedia
138138

139139
When you click **Go to** or double-click a document entry in Level 1, the document opens as it currently exists in your app. If the document no longer exists in your current state, Level 2 and 3 is shown but nothing opens in the editor.
140140

141-
{{% alert color="info" %}}
142-
In future releases, both versions of the document will be opened side by side for visual comparison. For now, only the current version opens.
143-
{{% /alert %}}
141+
For text-based properties, you can double-click a property row or use the context menu to open a detailed side-by-side comparison in the [File Differences Viewer](/refguide/file-diff-viewer/). For file-type documents in Level 1, double-click or click **Go to** to open the File Differences Viewer instead of a document editor.
144142

145143
## Refresh Behavior
146144

@@ -154,6 +152,7 @@ In the blank state, the **Comparison** pane displays a message with a link to st
154152

155153
## Read More
156154

155+
* [File Differences Viewer](/refguide/file-diff-viewer/)
157156
* [History](/refguide/history-dialog/)
158157
* [Changes Pane](/refguide/changes-pane/)
159158
* [Comparing Revisions](/refguide/comparing-revisions/)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "File Differences Viewer"
3+
url: /refguide/file-diff-viewer/
4+
weight: 27
5+
description: "Describes the File Differences Viewer, a built-in dialog box in Studio Pro for comparing text and file differences."
6+
---
7+
8+
## Introduction
9+
10+
The **File Differences Viewer** is a dialog box in Studio Pro that displays text differences between two versions of a file or two text values. It opens as a modal dialog box and shows additions, deletions, and modifications with color-coded highlighting.
11+
12+
{{< figure src="/attachments/refguide/modeling/menus/view-menu/file-diff-viewer/file-diff-viewer-split.png" alt="File Differences Viewer showing a side-by-side comparison with color-coded additions and deletions" class="no-border" >}}
13+
14+
## Accessing the File Differences Viewer
15+
16+
The File Differences Viewer opens automatically in the following scenarios:
17+
18+
* **Changes pane**:
19+
* When you view changes at the object level and double-click a text property row, the File Differences Viewer opens to show the old and new values of that property.
20+
* When you review disk changes (such as Java source code or widget files), you can right-click a modified file and select **Compare with original**, or double-click it, to open the File Differences Viewer showing the differences between your working copy and the last committed version.
21+
* **Comparison pane** – When you compare property values or files in the [Comparison pane](/refguide/comparison-pane/), clicking the **Compare** button opens the File Differences Viewer to show the differences.
22+
23+
## Toolbar
24+
25+
The File Differences Viewer toolbar contains the following buttons:
26+
27+
| Button | Action |
28+
|--------|--------|
29+
| **Refresh** | Reloads the file contents from disk. This is useful if you make changes to the file while the dialog box is open. This button is disabled when comparing text values. |
30+
| **Split/Inline** toggle | Switches between split view (side-by-side) and inline view (unified). |
31+
32+
## Reading the Diff
33+
34+
The File Differences Viewer uses the following visual indicators to show differences:
35+
36+
* **Green background** – Lines or words that were added in the newer version.
37+
* **Red background** – Lines or words that were removed from the older version.
38+
* **Word-level highlighting** – Within changed lines, individual words that differ are highlighted with a darker shade to pinpoint exact changes.
39+
40+
In the split view, the older version is shown on the left and the newer version is shown on the right, with column headers **Older** and **Newer**.
41+
42+
In the inline view, both versions are merged into a single column with the header **Differences**, where removed lines appear above added lines.
43+
44+
Line numbers are displayed for both sides to help you locate changes in the file.
45+
46+
## Read More
47+
48+
* [Changes Pane](/refguide/changes-pane/)
49+
* [Comparison Pane](/refguide/comparison-pane/)
50+
* [Comparing Revisions](/refguide/comparing-revisions/)
51+
* [Using Version Control in Studio Pro](/refguide/using-version-control-in-studio-pro/)

content/en/docs/refguide/version-control/using-version-control-in-studio-pro/push-pull.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,10 @@ In the **Changes** pane, you can find more detailed information. There is an ent
4040

4141
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/changes-pane.png" max-width=80% >}}
4242

43-
If you also changed Java source code, added widgets, or made other changes that affect files other than the app file, you will see entry for each changed file. You can right-click the entry and click **Open containing folder** to open the folder with the file on disk. For files with the **Modified** status, you can use **Compare with original** that opens an external tool to show the differences.
43+
If you also changed Java source code, added widgets, or made other changes that affect files other than the app file, you will see entry for each changed file. You can right-click the entry and click **Open containing folder** to open the folder with the file on disk. For files with the **Modified** status, you can use **Compare with original** to open the built-in [File Differences Viewer](/refguide/file-diff-viewer/) and see the differences.
4444

4545
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/changes-pane-file-changes.png" >}}
4646

47-
{{% alert color="info" %}}
48-
An external file comparison tool can be set in **Preferences** > **Version control** > **General** > **File comparison** > **Executable**.
49-
50-
A tool you can consider using is TortoiseGitMerge, shipped as part of [TortoiseGit](https://tortoisegit.org/download/). It is installed by default on this path: *C:\Program Files\TortoiseGit\bin\TortoiseGitMerge.exe*.
51-
{{% /alert %}}
52-
53-
{{% alert color="info" %}}
54-
Comparing files on disk with the original is currently not supported on macOS.
55-
{{% /alert %}}
56-
5747
{{% alert color="info" %}}
5848
When you successfully commit your app, this becomes the new original and all the change information is removed from the **App Explorer** and the **Changes** pane.
5949
{{% /alert %}}
@@ -94,20 +84,10 @@ Studio Pro also attaches some information automatically:
9484
* The list of changed documents, folders, and modules along with the type of the change (for example, **modify** or **add**)
9585
* The version of Studio Pro that was used to commit
9686

97-
If you also changed Java source code, added widgets, or made other changes that affect files other than the app file, you will see a **Changes on disk** tab that shows you what disk changes you are about to commit. **Open containing folder** opens the folder with the file on disk. For files with the **Modified** status, you can use **Compare with original** that opens an external tool to show the differences.
87+
If you also changed Java source code, added widgets, or made other changes that affect files other than the app file, you will see a **Changes on disk** tab that shows you what disk changes you are about to commit. **Open containing folder** opens the folder with the file on disk. For files with the **Modified** status, you can use **Compare with original** to open the built-in [File Differences Viewer](/refguide/file-diff-viewer/) and see the differences.
9888

9989
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/commit-git-changes-on-disk.png" >}}
10090

101-
{{% alert color="info" %}}
102-
An external file comparison tool can be set in **Preferences** > **Version control** > **General** > **File comparison** > **Executable**.
103-
104-
A tool you can consider using is TortoiseGitMerge, shipped as part of [TortoiseGit](https://tortoisegit.org/download/). It is installed by default on this path: *C:\Program Files\TortoiseGit\bin\TortoiseGitMerge.exe*.
105-
{{% /alert %}}
106-
107-
{{% alert color="info" %}}
108-
Comparing files on disk with the original is currently not supported on macOS.
109-
{{% /alert %}}
110-
11191
Committing is only allowed if your working copy is up to date with the repository. If someone else committed a change since the last time you pulled, you will have to pull first (this process is called **Commit and Combine** in the [Commit](/refguide/commit-dialog/#combine) dialog box). This is because the revision you create with the commit should incorporate both your changes and the changes by the other person. Updating will combine the latest changes in the repository with your changes. After reviewing the result and fixing any conflicts, you can commit again.
11292

11393
### Pushing {#pushing}

content/en/docs/refguide/version-control/using-version-control-in-studio-pro/resolving-conflicts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Click this button to bring the **Changes** pane into the view, as this is the pl
311311

312312
The **Show file conflicts** button is shown when there are conflicts in files which are not directly linked to your application.
313313

314-
When clicked, it opens up a pop-up window with a list of all the files that are affected by the update process, with conflicted ones at the top of the list.
314+
When clicked, it opens up a pop-up window with a list of all the files that are affected by the update process, with conflicted ones at the top of the list. You can view the differences for individual files using the built-in [File Differences Viewer](/refguide/file-diff-viewer/).
315315

316316
### Rebase-Specific Controls
317317

398 KB
Loading

0 commit comments

Comments
 (0)