ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Code editor
  • Overview
  • How to?
  • Collapsing an existing code
  • Expanding a code
  • Defining a set of lines of code to collapse/expand
  • Declaring a custom code block
  • Limits
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
The code is collapsed to improve readability, by only displaying the comments in front of the lines of code.
You can collapse a code that is already known and checked.
Collapsing this code is used to free space in the code editor. The code becomes clearer and more readable.
Several types of lines of code can be collapsed:
  • lines of code corresponding to a specific code structure: conditional instructions (IF, WHEN, EXCEPTION), declarations of globals, constants, structures, etc.
  • the lines of code preceded by a comment.
  • the specific lines of code, defined by the developer.
  • the lines of code corresponding to a multiline string.
  • the lines of code of a process.
You can also declare custom code blocks to collapse.
No code is collapsed by default.
Example of unrolled code: the chevron indicates that the code is unrolled:
New in version 2025
The materialization of the coiled/uncoiled code has been improved.
How to?

Collapsing an existing code

A code that can be rolled up is preceded by .
To collapse an existing code, you can:
  • or click on the sign in front of the start of the instruction. Only the comment line preceding the statement will remain visible.
  • or display the context menu for the sign and select the "Fold" option.
You can also:
  1. Move the edit cursor into the code to collapse.
  2. Use one of the following methods:
    • on the "Display" tab, in the "Collapsible code" group, expand "Collapse" and select "Collapse".
    • press Ctrl + the "-" key on the numeric keypad
When a collapsed code is hovered by the mouse cursor, a tooltip displays a section of the collapsed code.
Note To fold all foldable lines of code in the current process, under the "Display" pane, in the "Collapsible code" group, pull down "Collapse" and select "Fold all".

Expanding a code

A code that can be unrolled is preceded by .
To expand a code, you can:
  • or click on the sign in front of the code to be unrolled.
  • or display the context menu for the sign and select the "Unfold" option.
You can also:
  1. Move the edit cursor into the code to expand.
  2. Use one of the following methods:
    • on the "Display" tab, in the "Collapsible code" group, expand "Collapse" and select "Expand".
    • press Ctrl + the "+" key on the numeric keypad
Note To unfold all the lines of code rolled up in the current process, under the "Display" pane, in the "Collapsible code" group, pull down "Collapse" and select "Unfold all".

Defining a set of lines of code to collapse/expand

To specifically define the lines of code to collapse/expand:
  1. In the code editor, select the different lines of code that can be collapsed/expanded.
  2. On the "Display" tab, in the "Collapsible code" group, expand "Collapse" and select "Collapse selection".
The code is then immediately folded and the sign is displayed in front of the code.
Note To permanently unfold this set of lines of code:
  1. Position the mouse cursor on this code.
  2. On the "Display" tab, in the "Collapsible code" group, expand "Collapse" and select "Expand permanently".

Declaring a custom code block

To declare a custom code block, use the following syntax:
<BLOCK>
...
<END>
ou
<BLOCK Comment always displayed>
...
<END>
These blocks of code are used for example to highlight the different steps of an algorithm or to group the declarations of variables or members.
Example:
For more details, see the help about BLOCK.
Limits
WEBDEV - Server code Collapsing/Expanding code is not available in the page templates.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/31/2024

Send a report | Local help