Read-only code sections of AppBuilder-generated code
- Last Updated: February 19, 2024
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
You can make the sections of the AppBuilder-generated code read-only and foldable in the ABL Editor. This ensures that users do not modify the AppBuilder-generated code while editing the ABL procedure (.w) file in the ABL Editor. Editing the AppBuilder-generated code might make the AppBuilder procedure (.w) file corrupt, and display errors when trying to open in the ABL GUI Designer.
There are two main &ANALYZE directives in an AppBuilder (.w) file: &ANALYZE-SUSPEND and &ANALYZE-RESUME. The &ANALYZE-SUSPEND directive causes the Analyzer to suspend analysis of ABL code. The &ANALYZER-RESUME directive causes the Analyzer to resume analysis. See Code analysis in GUI Designer.
The identifiers that define the read-only rules are the &ANALYZE-SUSPEND and &ANALYZE-RESUME statement directives. When an ABL procedure (.w) file is opened in the GUI Designer, the &ANALYZE-SUSPEND and &ANALYZE-RESUME directives code are parsed to mark the code sections within these directives as read-only and foldable in the ABL Editor.
Here is a list of sample illustrations with the code snippets marking the code section or block within the &ANALYZE directives as read-only or editable:
- The following code snippet specifies that the code generated inside
the &ANALYZE block is read-only except the definition section which is
editable:

- Any code which is not surrounded by &ANALYZE-SUSPEND and &ANALYZE-RESUME is read-only.
- An &ANALYZE-SUSPEND statement which does not have _UIB-CODE-BLOCK or _QUERY-BLOCK as the second token is read-only.
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS block is editable.
- The following code snippet specifies how triggers and the main block are editable:
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS block is not read-only.
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK with _CONTROL as the third token is not
read-only, but the first line inside the block is read-only.
- The following code snippet specifies how procedures can be both read-only and
editable, and the functions as editable. Note that the END PROCEDURE and END
FUNCTION are editable:
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE with five tokens is not read-only.
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE with six tokens is read-only , unless the sixth token is _FREEFORM.
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION is editable. The data-type of the function must be editable.
- When you add Extended Features (XFTR) block to a procedure or template, then the code becomes editable.
- The following code snippet specifies how free form query elements inside a
&ANALYZE-SUSPEND _QUERY-BLOCK section are editable:
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK is editable between _START_FREEFORM and _END_FREEFORM or _START_FREEFORM_DEFINE and _END_FREEFORM_DEFINE tokens. These tokens are inside of comments.
- The following code snippet specifies how a browser definition for a free form query
is editable, allowing you to edit the field lists:
- An &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS section is editable when the sixth token is _FREEFORM.