Buck: Building the IntelliJ Plugin
Support Ukraine. Help Provide Humanitarian Aid to Ukraine.

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 ideabuck
Once 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.

  1. 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 to
      and pressing ctrl-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 in tools/ideabuck.

  2. 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 on tools/ideabuck/ideabuck.iml and choose Import "ideabuck" Module
  3. Remove the Buck Intellij Plugin, tools/ideabuck from the Compiler Excludes list.
  4. Create a new Plugin Run/Debug configuration for the Buck Intellij Plugin.
  5. Run/Debug the plugin or create a new release of it by going to Build > Prepare all plugin modules for deployment.