A new release, a new VS Code extension feature.
4D v19 R8 brings a new capability to the Visual Studio Code editor through the 4D-Analyzer extension: Say hello to code completion.
Starting with 4D v19R8, when you type code in a 4DM file, the contextual suggestions appear in a popup menu. You can go up and down in the list; the signature help of the highlighted item is displayed next.
And you can automatically validate the choice by typing the TAB keystroke or clicking on the desired item in the menu.
Code completion is available for:
- 4D commands
- object attributes
- object functions
The example below displays the VS Code screen when typing “This.t” in an entity class function.
The suggestions appear when you type several characters. But if you haven’t typed some characters yet, you can press the CTRL+SPACE keystrokes to display all contextual elements available.
In the example below, we typed the “File“ command and pressed the CTRL+SPACE keystroke to display all related constants.
Completion is also available for keywords! When you type an opening keyword such as If or Use, the corresponding ending keyword is proposed on the following lines.
Happy coding! And as usual, feel free to comment on the 4D Forums.