This plug-in currently supports:
- Syntax highlighting
- Collapsible code blocks for workflows, tasks, and more.
- Highlighting and completion of parentheses
()
and other braces. - Allows auto-commenting of lines in WDL with CMD+/
- Undeclared value detection
- "Go to declaration" (currently for declared values only)
More features will be coming soon!
The plugin is now part of the IntelliJ Plugin Repository. To install:
- Open the IntelliJ Preferences page
- Click on "Plugins"
- Click on "Browse Repositories "
- Search for and install "Winstanley WDL"
To build or test the plugin using IntelliJ:
- Get set up with the pre-requisites listed here: http://www.jetbrains.org/intellij/sdk/docs/tutorials/custom_language_support/prerequisites.html
- Create a new IntelliJ project using this repo as the existing source.
- Make sure the repo is using the IntelliJ plugin Java SDK
- Make sure the repo has a valid Scala SDK attached as a project dependency.
- Otherwise you'll see errors like
"Cannot find class WdlElementType"
even though it's clearly there!
- Generate the necessary files (on Mac):
- Navigate to Wdl.flex and generate sources using CMD+SHIFT+G.
- Navigate to wdl.bnf and generate sources using CMD+SHIFT+G
- At this point, you can run or test the project using IntelliJ's preset run modes.
- Open the
Run Configurations
window (for me, in the top right of the IntelliJ window) - Add a new one configuration with the
+
icon. - Choose the '
Plugin
' type. The defaults should be good. - When this new
Run Configuration
is run, a new IntelliJ window opens with the plugin preinstalled ready for testing. - Additional instructions for setting this up are in the IntelliJ links above.
The plug-in was created based on the instructions here: http://www.jetbrains.org/intellij/sdk/docs/tutorials/custom_language_support_tutorial.html