Skip to content

IntelliJ Plugin

IntelliJ houses the IDEA plugin. It communicates with the Integrates API to fetch live vulnerability data and mark it in users’ editors.

Internals

  1. The plugin is written in Kotlin with JAVA Swing used to build the custom UI. It also uses GraphQL to communicate with Integrates and fetch the data to be shown.

  2. The plugin is built with Gradle. The IntelliJ IDEA IDE provides an user interface to handle usual development and build tasks through Gradle:

    • apollo: Everytime you update any GraphQL operations, you will need to run the generateApolloSources task and correct the typing and handling errors that may come up. Object types described in domain/Types.kt should closely match the info you’re getting from Apollo.
    • intellij: This category houses the main tasks for developing and publishing the plugin. runIde and build being useful to try out a dev build and run the build process respectively.

Linting

The plugin uses ktlint to enforce compliance with a defined coding style. To view linting issues globally, run:

Terminal window
m . /common/utils/ktlint integrates/retrieves

Run locally

  1. Install the IntelliJ IDEA Community Edition, make sure it is the 2024.1 version as we do not support the 2024.2 & 2024.3 versions yet.
  2. Open the universe/integrates/retrieves/plugins/intellij folder in the IDE
  3. Run the plugin using runIde See Instructions
  4. Go to the running IDE
  5. Open the project related to the root
  6. Open the Fluid Attacks tab in the left menu
  7. Set the token generated in Fluid Attacks platform.

Generate plugin

  1. Go to the tasks category to the right side of the IDE. Click on the intellij category and select build
  2. In IntelliJ IDEA, go to File > Settings > Plugins.
  3. Click on the gear icon and select Install Plugin from Disk....
  4. Navigate to the build/distributions/ directory and select the .zip file.
  5. Restart IntelliJ IDEA to see your plugin in action.

Versioning

To publish your changes to the Jetbrains marketplace, you must increment the version number in the resources/META-INF/plugin.xml file and the pluginVersion field in the gradle.properties file as well. Once deployed, it will take around 1-3 business days for the new release to be reviewed by the Jetbrains staff.

The plugin follows the MAJOR.MINOR.PATCH scheme for versioning:

  • MAJOR: Breaking changes.
  • MINOR: Backward compatible changes.
  • PATCH: Bugfixes.

For more info, see the semver documentation.