We’re pleased to announce a useful new simplification in the 4D-Analyzer extension for Visual Studio Code!
This feature is aimed at streamlining the process of getting started and enhancing development with VS Code for 4D.
Until now, the 4D-Analyzer extension for VS Code required a 4D application (4D, 4D Server, or tool4d) running in the background. This setup enabled the extension to communicate with the 4D LSP (Language Server Protocol) server.
However, this requirement has been eliminated with the release of version 0.2.0 of the extension.
Now, the 4D-Analyzer extension can automatically download the tool4d application and use it as the LSP server for the 4D-Analyzer extension.
This becomes the default behavior.
Extension settings
This new feature brings several new parameters to the 4D-Analyzer extension settings:
Automatic tool4d download and use: By default, the LSP server application used is a tool4d application which is automatically downloaded. You can toggle this setting. If set to False, the extension will use the application defined by the existing “path” setting.
Version: You can define which version of tool4d to use. You can use the latest version of tool4d, the newest version of the Feature Release, the latest version of a defined Feature Release number, or the latest Long Term Service version of a release. But don’t panic; an error message is displayed if an invalid tool4d version is entered.
Here are the available templates:
– “latest” corresponds to the latest global version of tool4d. This is the default value and the best way to ensure you’re always up to date. Versions will be downloaded as they are released.
– “20R” corresponds to the latest tool4d 20 Feature Release version.
– “20R4” corresponds to the latest version of tool4d 20 R4. This will limit the download to 20R4 versions. Of course, you can specify “20R5”, “20R6,” and so on as they become available.
– 20″ means the latest version of toold4d 20 Long Term Service.
All versions include their HotFix releases. You can read this blog post for more information on 4D versioning.
Channel: You can choose to use the latest beta release of the defined version or the stable one.
tool4d download folder: You can optionally define the location where the downloaded tool4d will be placed on disk. If the location is not writable, an error message is displayed.
Updating
When the extension is started, it checks whether a new build is available for the defined version and channel. If so, a dialog box asks you to confirm the update.
Error Handling: when the extension cannot download the latest version of the defined tool4d version, an error message is displayed.
Note: you can still use your own local 4D, 4D Server, or tool4d application instead of the downloaded tool4d. To do this, deactivate the “Automatic download and use of tool4d” setting and indicate the executable path in the legacy “path” setting.
Commands
This new feature also introduces three new VS Code commands:
– Display the 4D version currently used: displays the tool4d’s current version and build number.
– Update tool4d to the latest version: initiates the update process manually, for example, when you have previously refused an update.
– Cleanup: cleans all unused tool4d versions from disk.
This new feature aims to streamline your development process, making it easier to work with VS Code. We hope you find it useful, and we look forward to your feedback!