Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 3.17 KB

development_setup.md

File metadata and controls

57 lines (48 loc) · 3.17 KB

Plugin Development Setup Guide

This guide provides instructions for setting up and developing our Bazel plugin for JetBrains IDEA.
Follow these steps to get your development environment ready.

Requirements

  1. IntelliJ IDEA 2024.2 Nightly or later Release, Release Candidate or EAP version.
  2. Install the latest plugins as described on our landing page.
    Note: Our debug/developer run configurations currently require both plugins to be installed.
  3. Plugin DevKit

How to develop/debug plugins

  1. git clone [email protected]:JetBrains/hirschgarten.git
  2. Open the cloned hirschgarten repo in IDEA and wait for it to import.
  3. Open "File->Project Structure". This opens the Project Structure dialog.
    Click "SDKs".
  4. Hit the "+" button.
    Click "Download JDK".
    Install JetBrains Runtime (JCEF) version 21.
    If JetBrains Runtime (JCEF) version 21 is not available, version 17 will also work.
  5. Hit the "+" button.
    Click "Add IntelliJ Platform Plugin SDK from disk".
    A file exporer with the 'Contents' folder will open.
    Click "Open" in this window.
  6. A "Select Internal Java Platform" dialog will open.
    Select jbrsdk_jcef-21 (or jbrsdk_jcef-17 if you didn't have version 21 in step 4) in the dropdown list and click "OK".
    Then click "OK" again.
  7. In the target view, expand the plugin-bazel subtree.
    Right-click plugin-bazel-with-server-debug and click Run.
    You'll receive an error Could not find an IntelliJ Platform Plugin SDK.
    Dismiss the error.
    Note: if you are interested in Bazel BSP connection flow, please use plugin-bazel/plugin-bazel-debug instead, as plugin-bazel/plugin-bazel-with-server-debug will bypass the normal BSP connection flow. If you are only interested in BSP plugin, please use plugin-bsp/plugin-bsp-debug.
  8. In the upper right corner you'll see a new run configuration.
    Click on it and select "Edit Configurations..."
  9. In the run configurations window click "Run" button at the bottom.
    This will start the first plugin run.
  10. The following plugin runs can be started by clicking "Run" button in the upper right corner, next to the now present run configuration.

Troubleshooting

Common Issues:

  • If you don't have JetBrains Runtime (JCEF) version 21, select version 17.
  • JetBrains Runtime (JCEF) version 21 should be available for anyone in JetBrains organization - if you don't see it, make sure your JetBrains Toolbox and IDEA are logged in with your @jetbrains.com email

Conclusion

After completing these steps, your development environment should be ready for plugin development. If you encounter any issues not covered here, please reach out to the team.