PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Displaying the dead code of project
  • Displaying the dead code of current element
  • Displaying the orphan elements of project
  • Flagging a code section or an element as used
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
When developing a project, some sections of code are written and no longer used. Similarly, windows or reports can be created and not used anymore.
WINDEV, WEBDEV and WINDEV Mobile allow you to easily detect these "dead codes" and "orphan" elements.
The static audit returns a full report regarding the elements that cause problems in your project.
You also have the ability to specifically identify:
  • the project procedures that are not used (dead code).
  • Versions 23 and later
    the procedures of current element that are not used (dead code).
    New in version 23
    the procedures of current element that are not used (dead code).
    the procedures of current element that are not used (dead code).
  • the project elements that are not used (orphan elements).
How to proceed?

Displaying the dead code of project

To display the dead code of project:
  1. Select "Project .. Edition audit .. Dead code".On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Dead code".On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Dead code of project".
  2. The window that lists the dead codes of your project is displayed.
  3. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure.
    • See the procedure.
    • Perform the search.
Versions 23 and later

Displaying the dead code of current element

To display the dead code of current element:
  1. In the editor, display the element to study: window, report, page, ...
  2. On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Dead code of current element".
  3. The window that lists the dead codes of current element is displayed.
  4. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure: Allows you to delete the procedure.
    • See the procedure: Allows you to display the procedure code. You also have the ability to double-click the procedure name.
    • Perform the search: Allows you to find the procedure in the current project.
New in version 23

Displaying the dead code of current element

To display the dead code of current element:
  1. In the editor, display the element to study: window, report, page, ...
  2. On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Dead code of current element".
  3. The window that lists the dead codes of current element is displayed.
  4. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure: Allows you to delete the procedure.
    • See the procedure: Allows you to display the procedure code. You also have the ability to double-click the procedure name.
    • Perform the search: Allows you to find the procedure in the current project.

Displaying the dead code of current element

To display the dead code of current element:
  1. In the editor, display the element to study: window, report, page, ...
  2. On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Dead code of current element".
  3. The window that lists the dead codes of current element is displayed.
  4. In this window, you can:
    • Flag the procedure as used (see below).
    • Delete the procedure: Allows you to delete the procedure.
    • See the procedure: Allows you to display the procedure code. You also have the ability to double-click the procedure name.
    • Perform the search: Allows you to find the procedure in the current project.

Displaying the orphan elements of project

To display the orphan elements of project:
  1. Select "Project .. Edition audit .. Orphan elements".On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Orphan elements".
  2. The window that lists the orphan elements of your project is displayed.
  3. In this window, you can:
    • Flag the element as used (see below).
    • Delete the element: Allows you to delete the element.
    • See the element: Allows you to see the element.
    • Perform the search: Allows you to find the element in the project.

Flagging a code section or an element as used

Caution: In some case, the edition audit of project or element may list elements that are considered as being dead code or orphan elements. Indeed, these elements can correspond to:
  • procedures called in another project.
  • procedures or elements called in dynamic compilation.
  • elements whose name is built dynamically.
These elements can be marked as "used". Therefore, these elements will no longer be displayed in the list of unchecked elements. These elements will be displayed in the list of "Procedures or elements marked as used".
Versions 15 and later
Marking an element as being unused
A window or a test page found in your project can be analyzed as being "unused". In order for this element to be directly registered in the elements marked as being unused, all you have to do is specify it in the "Declaration code of global variables" of the element via the following syntax:
<useful = "Reason">
where "Reason" corresponds to the text indicating to the developer why the element is found in the list of elements marked as being unused. This text will be displayed in the "Comment" column of the window for managing the orphan elements.
For example:
<useful = "Window for internal tests">
New in version 15
Marking an element as being unused
A window or a test page found in your project can be analyzed as being "unused". In order for this element to be directly registered in the elements marked as being unused, all you have to do is specify it in the "Declaration code of global variables" of the element via the following syntax:
<useful = "Reason">
where "Reason" corresponds to the text indicating to the developer why the element is found in the list of elements marked as being unused. This text will be displayed in the "Comment" column of the window for managing the orphan elements.
For example:
<useful = "Window for internal tests">
Marking an element as being unused
A window or a test page found in your project can be analyzed as being "unused". In order for this element to be directly registered in the elements marked as being unused, all you have to do is specify it in the "Declaration code of global variables" of the element via the following syntax:
<useful = "Reason">
where "Reason" corresponds to the text indicating to the developer why the element is found in the list of elements marked as being unused. This text will be displayed in the "Comment" column of the window for managing the orphan elements.
For example:
<useful = "Window for internal tests">
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment