Skip to main content

IntelliJ Setup

Automatic schema code generation

Install the File Watchers plugin:

  • File -> Settings -> Plugins -> Marketplace
    • Search File Watchers -> Install

Configure the plugin:

  • File -> Settings -> Tools -> File Watchers
    • Add -> custom
      • Name: sbe-code-gen
      • Files to Watch:
        • File type: xml
        • Scope -> ...
          • Name: sbe-xml
          • Pattern: file:sbe.xml
      • Tool to Run on Changes:
        • Program: mvn
        • Arguments: generate-sources
        • Working directory: $ModuleFileDir$
      • Advanced Options
        • Show console: Always

Screenshot

Troubleshooting

Reloading Maven Projects After Code Generation

After the File Watcher generates new SBE code, you may need to reload your Maven project to ensure IntelliJ recognizes the newly generated classes and updates its indexing.

Manual Reload

  1. Open the Maven tool window (View -> Tool Windows -> Maven)
  2. Click the Reload button (circular arrow icon) in the Maven tool window
  3. Alternatively, right-click on your project in the Maven tool window and select Reload all Maven Projects alt text

Force restart

If Issues persist after Manual reload, restart the project by doing the following:

  1. In the Maven tool window, right-click on your project
  2. Select "Reload project" or "Reimport"
  3. If issues persist, try File -> Invalidate Caches... -> Invalidate and Restart alt text alt text

This ensures that IntelliJ's code completion, navigation, and error detection work properly with your newly generated SBE classes.