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
-
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.
-
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 thegenerateApolloSources
task and correct the typing and handling errors that may come up. Object types described indomain/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
andbuild
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:
Run locally
- 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.
- Open the
universe/integrates/retrieves/plugins/intellij
folder in the IDE - Run the plugin using
runIde
See Instructions - Go to the running IDE
- Open the project related to the root
- Open the Fluid Attacks tab in the left menu
- Set the token generated in Fluid Attacks platform.
Generate plugin
- Go to the tasks category to the right side of the IDE. Click on the
intellij
category and selectbuild
- In IntelliJ IDEA, go to
File > Settings > Plugins
. - Click on the gear icon and select
Install Plugin from Disk...
. - Navigate to the
build/distributions/
directory and select the.zip
file. - 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.