Building and Running the plugin
This plugin is built using Gradle. If you build or run it the first time it will download the community edition of IntelliJ automatically. You don’t need to install Gradle, you just need to install Java and make it available in the path.
If you have developed the plugin before it changed to Gradle you might want to remove the contents of your
.idea folder to trigger a re-import of the Gradle project.
To build this plugin, you need to run:
./gradlew -Dfile.encoding=UTF-8 buildPlugin
The ZIP file with plugin to distribute will be located in
To run the plugin for development you’ll need to start
./gradlew -Dfile.encoding=UTF-8 runIde
To run all tests and the CheckStyle validations you’ll need to start
./gradlew -Dfile.encoding=UTF-8 check
You most likely want to do this for fast turnaround times when running single tests, and debugging both tests and the plugin itself. Please use IntelliJ IDEA as an IDE for developing on this plugin.
You can use the most recent version of the IDE.
build.gradle file specifies the minimum version for all users of the plugin, but when developing you are free to use a more recent version.
Checkout the GitHub project and import it as a gradle project.
Ensure to install the following plugins (your IDE should recommend installing them once you open the project):
Helps with highlighting and code completion in Grammar files (*.flex).
Helps analyzing the PSI (abstract syntax tree) created from the plugin in the IDE.
This project contains a ready-to-go CheckStyle configuration that will work both in the IDE and in gradle.
Go to "Project Structure… | Platform Settings | SDK":
add "JetBrains JDK 8" (see [JDK] above where to download)
choose "JetBrains JDK 8" as the JDK for this project
Perform these tasks to ensure that your setup is ready for development.
Run the test cases from
AsciiDocLexerTest.javato see that running tests works in your setup.
There are two ready-to-go run configurations checked in to git that you can run:
building the plugin as a ZIP-file that you can then install locally into your IDE
runs an IntelliJ community edition with the AsciiDoc plugin enabled. You can choose to run it in debug mode.