ADL and AQL visual studio code extension

,

Nedap Healthcare is pleased to announce our new open source visual studio code extension, for editing, validating and working with OpenEHR ADL and AQL files. It brings full ADL 2 language support to visual studio code, including syntax highlighting, document outlines, hover information, syntax and model validation, OPT 2 generation, example RM Object generation, automated terminology code additions and more.

If you have archetypes present in your workspace, you can then create AQL queries - for which this offers not only syntax highlighting, validation and human readable paths, but also code completion for archetype paths.

For ADL 1.4, it offers more basic support: syntax highlighting, basic syntax validation and document outlines. Its main purpose currently is to offer ADL 1.4 to ADL 2 conversion.

The extension can be found at https://marketplace.visualstudio.com/items?itemName=NedapHealthcare.openehr-adl-lsp , or by searching for openehr in visual studio code extensions, or by opening a .adls or .aql file in visual studio code. The source can be found under the Apache 2 license at https://github.com/nedap/archetype-languageserver .

For people who do not want to use visual studio code, this plugin is editor independent: it has been written as a language server using the open language server protocol, plus two textmate grammars. The only visual studio code specific part is the packaging. That means it can be used with many editors and IDEs and it has been successfully tested with IntelliJ, where I use it myself when working on the Archie library.

Have fun modeling!

6 Likes

Hi Pieter,

This is good initiative - one of those small but appreciated things that makes programmer’s life easier (and code safer).
Can you give some instruction (on github index page) how to install it on IntelliJ?

1 Like

Sorry for the late reply. To do this in eclipse:

  1. download the .vsix file from the marketplace. Rename to .zip and unzip it
  2. install the LSP plugin in eclipse, from https://plugins.jetbrains.com/plugin/10209-lsp-support
  3. Configure LSP plugin as follows:
  • raw command,
  • extension adls,
  • point command to the command for your os within the zip, for mac os this is extension/lsp-images/archie-lsp-macos/bin, there’s a linux and windows variant as well
  1. add textmate bundles to eclipse for ADL and AQL, point to syntaxes/adl.tmGrammar.json and syntaxes/aql.tmGrammar.json within the extracted zip-file

And it should work. A similar approach works in many editors/IDEs.