Products Downloads


French version


 

The Adelia Studio editor features a real-time program source syntax analyzer module.

 

This module is only available if the Analyze source during input box is checked in the Editor options screen's Verification tab.

 

Access

When the source code or context is modified, the source code fast verification process is run after a configurable delay (set in the Editor options).

It can also be run on demand by clicking the Fast Verification button on the Editor's tool bar.

 

Any messages relating to this dynamic verification process are displayed as tool tips in the code being edited.

The dynamic verification feature provides real-time feedback relating to the validity of a 4GL source and the data manipulated by it.

 

The real-time analyzer provides data to two separate editor features:

  • Object Inspector: This feature provides information about the elements (e.g. variables, graphical objects and programs) handled in the source, and in some cases triggers related actions, such as opening a program source or positioning to a variable's definition.
  • Syntax Analyzer: This feature underlines any errors in the Adelia source, and in some cases suggests solutions.

Only program sources are analyzed; the sources of management rules, macro-instructions and program templates are not checked.

 

The object inspector

The object inspector uses a tooltip to display information about an object handled in the source.

For a variable, for example, the inspector displays the following details:

  • definition (alphanumeric (x), boolean, etc.),
  • visibility context (with local variables),
  • origin (if derived from a management rule).

 

 

Inspecting a graphical object property

 

Inspecting a program

The parameter's name would have been displayed if the called program had been generated and the necessary data was present in the relevant database.

 

Inspecting a variable

ZVARMR is a local variable used in the ID_WIN5 window; it is generated by the A_TST1 management rule.

 

With certain objects, the inspector can trigger related actions. These actions are available in the 4GL editor's context-sensitive menu, opened by right-clicking on the object.

The possible actions are:

  • for a locally-declared variable: position to the line containing the declaration;
  • for a program, management rule or macro-instruction: open the corresponding 4GL source directly.

 

 

Opening the called program's source.

 

The syntax analyzer

The syntax analyzer reports any syntax errors and sends warnings in some cases. It automatically suggests corrections wherever possible.

Error messages are shown in a tooltip.

If errors are detected, a special context-sensitive menu indicates the errors and suggests corrections.

You can prevent the analyzer's tooltip or context-sensitive menu from being displayed by holding down Shift when making your selection. This lets you view the object inspector's message in order to check a variable's definition when an error is reported, for example, and enables you to open the normal context-sensitive menu.

 

 

If a warning is displayed during an assignment operation:

 

Hold down the Shift key and move the pointer over the variable name again to read the information:

The variable is six characters long...

 

The user attempts to assign an 18-character long constant to this variable.

The analyzer detects that FI_FI is not valid in the context of the SQL condition.

The analyzer suggests alternatives that are consistent with the context (in this case a field from the FILE file). The most similar alternatives are shown first.

 

The BETWEEN operator cannot be used with three operands.

 

 

Analyzer messages have one of three severity levels. Messages are included in the program's text in different ways, depending on their category:

Errors

underlined in red.

Warnings

underlined in green; warnings can be filtered.

Information messages

underlined in green; information messages can be filtered.

 

Whatever filtering is applied, the number of errors and warnings is indicated by icons in the editor's status bar:

 

In this example, there are no errors, and two warnings.

 

In addition, any errors and warnings are flagged by a pictogram at the edge of the source code.

 

↑ Top of page

  • Aucune étiquette