This repository contains the IntelliJ plugin for FIDL. For information about contributing to this project, please read CONTRIBUTING.md.
To start, git clone
this repository into a local directory named fidl-plugin
(the name is important - it is referenced by the IntelliJ configs stored in the /.iwjb
folder). This may be done from either the command line or the built in IntelliJ git interface.
If you do not already have Bazel, install the command line bazel
package, following the instructions for your platform.
Next, install the following 3 IntelliJ plugins. While not strictly required, using these will make working on the FIDL plugin a much smoother experience:
The FIDL plugin is developed using JetBrains' DevKit platform, so open the repository in IntelliJ and follow the instructions found here to set up a local plugin development environment.
If you are using the Bazel plugin mentioned above, you should have a Build Plugin
Run Configuration preloaded in IntelliJ for you. You may also build from the command line by navigating to the fidl-plugin
directory and invoking the following command:
bazel build :fidlplugin
To test plugin changes, you'll need to go through the laborious process of reloading the plugin from source, then restarting IntelliJ to view your changes. The plugin can be reloaded as follows:
fidl-plugin/blaze-bin/fidlplugin.jar
.Repeat the above each time you make a change. Note that there may be a more ergonomic workflow that integrate with IntelliJ's “Run...” functionality to automatically build and run a sandboxed copy of IJ with your plugin installed. If you figure out how to do this, please update this document with instructions.
If you add/remove BNF rules, make sure to update the relevant generated .java
dependencies in the /src/fuchsia/developer/plugin/fidl/BUILD
file.