- How to?
- Enabling the code history
- Viewing the code history
- Restoring a code found 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 is used to:
- store the entire code of each modified process.
- 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,
- the windows and the pages,
- the queries,
- the classes,
- the sets of procedures.
Remark: If the project is found in the SCM (Source Code Manager), you have the ability to quickly view the modified elements. For more details, see History of a code line
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 window for viewing the history 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 found in the history
To restore a code found in the history:
- Display the history of 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, ...).
- Copy the selected code to the clipboard ("Copy" from the popup menu or Ctrl + C).
- Close the window for code history.
- In the code window, select the code to replace (with the mouse, Ctrl + A, ...).
- Paste the contents of the clipboard ("Paste" from the popup menu or Ctrl + V).
Clearing the code history
This method allows you to delete the modifications specific to a process.
To clear the code history:
- Display the process whose history must be cleared.
- On the "Code", in the "Other actions" group, expand "History" and select "Clear history".
Caution: If you clear the history of a process, the history of this process cannot be displayed anymore. The next modifications made to this process will be automatically stored if the code history is enabled.
: The window for code history can also be used to delete the current modification (
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 code line.
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 code lines 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…