Building the IntelliJ Plugin
To build the Buck Intellij Plugin you will have to install Buck, by following the guide from Downloading and Installing Buck, the manual build process to get the repo.
Building with Buck
cd third-party/java/intellij/ sh get_jars.sh "PathToYourIntellijLib" #for unix systems get_jars.bat "PathToYourIntellijLib" #for windows systems buck build ideabuckOnce you have built the plugin, you can install it by following the Installing a Plugin from Disk guide. In order to access it you have to go to
View > Tool Windows > Buck
.Building with Intellij
The ideabuck plugin can also be built with intellij. A big advantage of this, when working on the plugin, is the fact that you can easily debug it by creating a new Run/Debug Configuration.
- Generate the grammar and the lexer with the Grammar-Kit plugin.
- You can install the grammar kit plugin from
third-party/java/grammar-kit/grammar-kit.jar
by following the Installing Plugin from Disk guide. After you installed Grammar-Kit you can generate the files by navigating in Intellij totools/ideabuck/src/com/facebook/buck/intellij/ideabuck/lang/Buck.bnf tools/ideabuck/src/com/facebook/buck/intellij/ideabuck/lang/Buck.flex
and pressingctrl-shift-G / meta-shift-G
. - If you don't want to install the Grammar-Kit plugin you can run
python tools/ideabuck/scripts/generate_grammar_kit.py
The above mentioned commands will create a
gen
directory intools/ideabuck
.
- You can install the grammar kit plugin from
- Configure the Intellij Platform Plugin SDK and set it as the SDK of ideabuck module. If you don't see "ideabuck" in the
Project Settings/Modules
, you need to first import ideabuck module by right clicking ontools/ideabuck/ideabuck.iml
and chooseImport "ideabuck" Module
- Remove the Buck Intellij Plugin,
tools/ideabuck
from the Compiler Excludes list. - Create a new Plugin Run/Debug configuration for the Buck Intellij Plugin.
- Run/Debug the plugin or create a new release of it by going to
Build > Prepare all plugin modules for deployment
.