A pre-compiled, easy-to-install Blang IDE is available on the main Blang website. Use the pre-compiled version instead of the instructions in this page, unless you want to do development on Blang itself.
The instructions on this page can also be used for motivated Linux users who want to use Blang IDE (we do not have yet a pre-package Blang IDE for Linux).
Prerequisites:
- Java 8+ installed.
- Tested on a few UNIX architectures; in theory should run on windows but not tested yet.
Instructions:
- Clone all github repositories listed at the bottom of this page.
- Download Eclipse Oxygen for xtext development. Link
- In the meanwhile, prepare the cloned repos for eclipse:
- In
blangDSL/ca.ubc.stat.blang.parent
, type./gradlew eclipse
- In
blangSDK
, type./setup-eclipse.sh
- In
- Start eclipse, and import blangDSL as
Existing project
. Make sure to check the box for adding subprojects. - Initially (and if the grammar changes), right-click on
ca.ubc.stat.blang/src/ca.ubc.stat.blang/GenerateBlangDsl.mwe2
and selectRun as
>MWE2 workflow
. This generates various files for parsing, lexing, IDE, etc, based on the grammar (ca.ubc.stat.blang/src/ca.ubc.stat.blangBlangDsl.xtext
). Note: a potential issue here is that a generated folder may not be included in the path. If you see errors after refreshing and cleaning, right click onca.ubc.stat.blang
, go to properties, java build path, source and make sureca.ubc.stat.blang/src-gen
is in the list. - Once this is finished, you might have to clean and rebuild, then, right click on the project
ca.ubc.stat.blang
and selectRun as
>Eclipse Application
. - This starts a new eclipse, namely the Blang IDE.
- Now in this new eclipse, import the project
blangSDK
as existing project.
Now, if you create new .bl
files in blangSDK
, the child eclipse will infer it's a Blang file and will provide auto-complete, syntax highlighting, errors messages, etc.