ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Code editor
  • Overview
  • How to?
  • Enabling the code history
  • Viewing the code history
  • Restoring a code in the history
  • Clearing the code history
  • History of a code line (project found in the SCM (Source Code Manager))
  • Notes
  • Saving the code history
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The code history allows you to:
  • keep track of every change made to the code in the different processes/events.
  • restore the code from a given date, if this code was mistakenly deleted or modified since.
The code history is available for the events or processes associated with:
  • the project,
  • windows and pages,
  • reports,
  • queries,
  • classes,
  • sets of procedures.
Remark: If the project is in the Source Code Manager (SCM), you can quickly see which elements have been modified. For more details, see History of a line of code.
How to?

Enabling the code history

To enable the code history in your project:
  1. On the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
  2. In the "Code" tab, check "Save history of code changes".
Remarks:
  • To disable the code history, uncheck this option.
  • If several modifications are performed in the code of a project, the size of the files containing the code history can become quite large.

Viewing the code history

To view the code history of your project:
  1. Display the process whose history must be viewed.
  2. On the "Code" tab, in the "Other actions" group, expand "History" and select "Show history of modifications". The history window appears.
  3. Click the versions to the left of the window to scroll through the changes made on the current process. This window allows you to:
    • view the differences between the selected element and the current version ().
    • print the version shown ().
    • delete the current modification.

Restoring a code in the history

To restore a code in the history:
  1. Display the history of the current process: on the "Code" tab, in the "Other actions"group, expand "History" and select "Show history of modifications".
  2. Find the code to restore.
  3. Select the code to restore (using the mouse, Ctrl + A, etc.).
  4. Copy the selected code to the clipboard (Ctrl + C).
  5. Close the code history window.
  6. In the code window, select the code to replace (with the mouse, Ctrl + A, etc.).
  7. Paste the clipboard content (Ctrl + V).

Clearing the code history

This method allows you to delete the modifications specific to a process.
To clear the code history:
  1. Go to the process or event for which you want to clear the history.
  2. On the "Code", in the "Other actions" group, expand "History" and select "Clear history".
Caution: Once cleared, the history of a process or event can no longer be viewed. Future changes to this process or event will be automatically save if the code history is enabled.
Remark: In the code history window, you can also delete current changes ( button).

History of a code line (project found in the SCM (Source Code Manager))

When a project is in the SCM, the code editor proposes an advanced history of the line of code.
During a click on the date, a tooltip allows you to:
  • Find out since when the modification was performed.
  • View the code modification that was performed: In this case, the SCM window used to compare the code versions is displayed.
  • View all modifications: In this case, the SCM window used to compare the versions of current element is displayed.
  • Access the history of the element: In this case, the SCM window used to list the history of current modifications is displayed.
Use conditions: To use this feature, the following conditions must be fulfilled:
  • "Date and Author" option enabled: On the "Display" tab, in the "Help for edit" group, check "Show date and author" (F6).
  • The lines of code must have been modified and checked back in in version 19 (or later).
Remark: If a comment was entered when the modified element was checked back in, this comment is displayed in the tooltip.
Notes

Saving the code history

When history is enabled, a "History" subdirectory is created in the project directory. This directory contains the following subdirectories:
  • WDP: history of events associated with the project.
  • WDW: history of events associated with the windows.
  • WWH: history of events associated with the pages (WEBDEV only).
  • WDC: code history of classes.
  • WDE: history of events associated with the reports.
  • WDR: history of events associated with the queries.
  • WDG: code history of sets of procedures (or server procedures).
  • WWN: code history of sets of browser procedures (WEBDEV only).
In each subdirectory, ".FIC", ".NDX" and ".MMO" files corresponding to the name of windows, project, ... contain the code history for each element. These files can take a large amount of space after a little while. They can be:
  • directly delete them in Windows Explorer.
  • cleared from the code editor.
Caution: The code history will not be displayed anymore if these files are deleted or cleared. If the code history is enabled:
  • the next modifications made to the code will be automatically saved,
  • the files will be re-created if necessary.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/25/2022

Send a report | Local help