See the extension introduction for basic information regarding the eQASM extension. This file briefly introduces the processes for building this extension from source code.
The services provided by this extension mainly come from two components, i.e., a language server and a syntax highlighting file.
- The language server provides IntelliSense features such as syntax error detect and definition navigation. In this extension, the language server is implemented using XText. The source code is in eqasm_languageserver folder.
- The syntax highlighting file (mydsl.tmLanguage.json) is manually written following TextMate grammar.
To build this extension, you need to first build the language server and then compile the extension.
- Prerequisite: Java Development Kit (JDK), Eclipse (DSL package), and Gradle.
- Run the following commands
cd eqasm_languageserver\org.pcl.eqasm.parent
gradlew build
The building process may take a few minutes.
- Expand the compressed file (either org.pcl.eqasm.ide-1.0.0-SNAPSHOT.tar or org.pcl.eqasm.ide-1.0.0-SNAPSHOT.zip) in
eqasm_languageserver\org.pcl.eqasm.parent\org.pcl.eqasm.ide\build\distributions\
folder toeqasm_extension\src\
cd eqasm_extension
yarn install
The building process can typically be done within a minute. node_modules
and out
folders will be generated
You can debug the extension with VS Code using the following commands:
cd eqasm_extension
code .
Press F5
or select Debug -> Start debugging
in the menu, a new VS Code window will pop up. This window works as if the extension has already been installed.
The eqasm_extension\
folder can be packaged into a .vsix
file using the following commands:
cd eqasm_extension
vsce package
vsce
can be installed with npm install -g vsce
.
- VS Code extension API
- An introduction on TextMate grammar