|
|
|
|
|
- Overview
- How to?
- Enabling code completion
- Remarks
- Code language
- Automatic completion for types of variables
Autocompletion is available for WLanguage commands, procedures, variables, data files, items of data files, windows, controls, types of variables, etc. This Autocomplete functionality reduces the risk of typing errors and saves a lot of time: no need to search for the exact name of a global variable or control, it is automatically suggested! The automatic completion is used to: - complete the current input by suggesting a list of possible values (function name, property name, etc.). All the values suggested in the list contain the word being typed.
The content of the list is refreshed as you type. For example, when you type "OKC", all the elements (functions, controls, constants, code snippets, etc.) containing those letters appear. Remark: The autocomplete functionality is also available when you change a function that you already entered in the code editor. For example, if you want to replace "HReadFirst" with "HReadSeekFirst", when you start typing "Seek" between "Read" and "First", the autocomplete feature automatically shows "HReadSeekFirst". When you select the new function, the old function is automatically replaced. - suggest the value of the possible parameters according to the WLanguage function used.
For example, when using HRead, the first expected parameter corresponds to the name of a data file. In this case, only the data files of the analysis associated with the current project will be suggested. - select a combination of constants for a given parameter.
To do so, select the desired options (with the arrow keys) and press Space to confirm. Once confirmed, all selected options are automatically integrated into the code. Remark: Constants are separated in areas highlighted with different colors to identify the constants that can be combined. For example, two constants in the same area with a radio button cannot be selected simultaneously. - open the code wizards. These wizards allow you to enter the different parameters of the function by answering simple questions.
The <Xxx wizard> option indicates that a wizard is available. To open the wizard, select this option. - suggest the different available extension attributes on the current line of code.
An extension attribute corresponds to a directive passed to the compiler. These attributes are powerful and practical. To get the list of extension attributes available on the current element, simply type "<". For more details on the available extension attributes, see List of extension attributes.
Remarks: - To select one of the suggestions:
- Navigate through the list using the arrow keys.
- Confirm the selection:
- with the Enter key.
- with the Tab key.
- The drop-down lists can be resized.
- If your procedure or function uses a project element (window, page, report, etc.), you can include the list of desired elements in the code suggestions. To do so, simply add a specific extension attribute in the declaration of the function or procedure parameters. For more details, see Parameters of a function or procedure.
- If you use a Data Source variable, simply add a specific extension attribute and associate it with an existing data file or query. In this case, you will be able to directly access the items in the code suggestions. For more details, see Data Source variable.
- The code editor also offers parameter suggestions, etc. For more details, see Code editor: Code completion.
Enabling code completion To enable code completion in your project: - Open the code editor options: on the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
- Check "Show code suggestions after" and specify the time after which the code suggestions should appear.
Remark: To disable the automatic completion, uncheck this option. Code language The WLanguage keywords in the code suggestions are available in English and French. To change the language used by the automatic completion functionality: - Open the code editor options: on the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
- Select the language of the code in the "Code language: " combo box.
Automatic completion for types of variables When you declare a new variable, the different types of variables appear automatically in the code suggestions. Simply write: "MyVariable is ".
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|