- 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))
- Saving the code history
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,
- 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
Enabling the code history
To enable the code history in your project:
- On the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
- In the "Code" tab, check "Save history of code changes".
- 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:
- Display the process whose history must be viewed.
- On the "Code" tab, in the "Other actions" group, expand "History" and select "Show history of modifications". The history window appears.
- 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:
- Display the history of the current process: on the "Code" tab, in the "Other actions"group, expand "History" and select "Show history of modifications".
- Find the code to restore.
- Select the code to restore (using the mouse, Ctrl + A, etc.).
- Copy the selected code to the clipboard (Ctrl + C).
- Close the code history window.
- In the code window, select the code to replace (with the mouse, Ctrl + A, etc.).
- 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:
- Go to the process or event for which you want to clear the history.
- 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.
: In the code history window, you can also delete current changes (
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 "Display 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.
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.
This page is also available for…