ASAM OpenSCENARIO® DSL
Akkodis osc-language-server helps developers write, understand and improve ASAM OpenSCENARIO DSL code by providing:
- live error checking while typing
- go-to-definition
- hover information
- semantic highlighting
Setup
osc-language-server
server
The extension includes the osc-language-server
language server for both Windows and Ubuntu 20.04 x86-64.
This also includes a built-in version of the standard domain model library that is used by default, including:
- osc.standard (for backwards compatibility with version 2.0 of the language)
- osc.standard.types (for physical types and structures based on them)
- osc.standard.domain (for the domain model specific parts)
- osc.standard.all (both types and domain)
The linux version does currently not include the necessary external libraries, so you must ensure that some packages are installed in your system.
Those are:
- libjsoncpp1
- libantlr4-runtime4.8
- libboost-program-options1.71.0
You can install them with:
sudo apt update
sudo apt install libjsoncpp1 libantlr4-runtime4.8 libboost-program-options1.71.0
Features
Semantic Highlighting
Semantic highlighting offers a superior way of highlighting source code compared to syntax highlighting, because it can highlight the code not just based on the
type of token, but based on its actual meaning in the code.
To make sure semantic highlighting is active, look in the plugin settings and ensure the checkbox for it is checked. Also, you should either disable or uninstall
any syntax highlighting extension for OpenSCENARIO DSL you might have installed.
Errors and warnings
Errors in the code are marked and shown while typing.
There are also some warnings that mostly notify about:
- constructs that the language server understands, but are non-standard
- constructs that are not fully supported yet
- a few style issues in the code (e.g. exporting an identifier from a namespace without ever defining that identifier
Hover hints
The language server can describe most entities if you hover the mouse over them (or press Ctrl-KI).
It can show you information about types, fields, parameters, methods, events, namespaces and certain values.
Known limitations and not-yet supported features
- Reexport-all (reexporting ns::* from another namespace) is not supported.
- For constraints, there are checks if the expressions themselves make sense, but no constraint resolution is done, so conflicting constraints are not detected.
- There is limited support for cover/record
- remove_default is not supported
- escaped unicode character numbers with 16 oder 32 bits are not supported
- conditional inheritance is ignored
- list constructors with enum values may fail if there are multiple candidates for the enum's type. Use long enum member names to disambiguate.
- incorrect method overriding (e.g. overridden method has a different signature from base method) is not always detected
Bugs
If you think you've found a bug in this extension, please report it to rolf.magnus@akkodis.com.
Ideally, add an .osc file that can be used to reproduce the problem, as well as a description of what you expected to happen and what happened instead.
See our product site for more information about our products.
ASAM OpenSCENARIO® DSL is a registred trademark of ASAM e.V.