Drop support for IntelliJ 2017

New features in 0.18 require IntelliJ 2018+.

Change-Id: Id872a921ab4a8eae70b217f9aca4ffda76b0ae1d
Reviewed-on: https://fuchsia-review.googlesource.com/c/intellij-language-fidl/+/628503
Reviewed-by: Alex Zaslavsky <azaslavsky@google.com>
1 file changed
tree: a9568e9da4eb40d5a189066d95a4f0f087269db8
  1. .ijwb/
  2. grammar_kit/
  3. intellij_platform_sdk/
  4. jarjar/
  5. resources/
  6. src/
  7. test/
  8. third_party/
  9. .gitignore
  10. AUTHORS
  11. BUILD
  12. CONTRIBUTING.md
  13. fidl-plugin.iml
  14. fidl-plugin.ipr
  15. jarjar_rules.txt
  16. LICENSE
  17. PATENTS
  18. README.md
  19. WORKSPACE
README.md

IntelliJ Plugin for FIDL

This repository contains the IntelliJ plugin for FIDL. For information about contributing to this project, please read CONTRIBUTING.md.

Setup

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:

  • Bazel - This repo uses the Bazel build system. The Bazel plugin allows for easier build and debug integration.
  • Grammar-Kit - A JetBrains authored plugin that provides syntax highlighting and automatic code generation for .bnf and .flex files.
  • PSIViewer - Helpful for navigating the IntelliJ plugin model during development.

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.

Building

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

Development

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:

  1. Navigate to Plugins in your settings, and uninstall the existing FIDL Plugin (if one has already been installed).
  2. At the top of the dialog, click the settings icon next to Marketplace and Installed, then select Install Plugin from Disk... from the dropdown.
  3. Install the plugin JAR, located at 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.