|
|
|
|
|
- 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 completion reduces the risk of typos and saves a lot of time: no need to search for the exact name of a global variable or control, it is automatically proposed! The automatic completion is used to: - complete the current entry with an intelligent 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 entering the characters "OKA", all elements (functions, fields, constants, code snippets, etc.) containing these characters are proposed. Remarks: - 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. New in version 2025The elements proposed in the combo are colored in the same way as in the code. New in version 2025The element type is indicated at the end of the line.
- 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. The automation will only propose data files from the analysis associated with the current project. - 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. Note: constants are separated into different colored zones to identify constants that can or cannot be combined (two constants present in a colored zone with a picker 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, state, etc.)it is possible to obtain the list of required elements in the. 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: Input help.
Enabling code completion To enable code completion in your project: - Display code editor options: under the "Home" pane, in the "Environment" group, pull down "Options" and select "Code editor options".
- Check "Show code suggestions after" and specify the time after which the code suggestions should appear.
Note To disable automation, 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: - Display code editor options: under the "Home" pane, in the "Environment" group, pull down "Options" and select "Code editor options".
- 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 a ".
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|