Code Inspections and Intentions
The code inspections for custom languages use the same API as all other code inspections, based on the
The main differences are:
supports batch analysis of code (through theaction)
the possibility to turn off the inspection (globally or by suppressing them on various levels)
ability to configure the inspection options.
If none of that is required and the analysis only needs to run in the active editor, Annotator provides better performance (because it supports incremental analysis) and more flexibility for highlighting errors.
See Inspections topic in the IntelliJ Platform UI Guidelines on naming, writing description, and message texts for inspections.
To optimize processing in local inspections, a custom language plugin should register the default
PsiElementVisitor for its language in
com.intellij.inspection.basicVisitor extension point (2023.3).
The code intentions for custom languages also use the standard API for intentions. The intention classes need to implement the
IntentionAction interface and are registered using the
com.intellij.intentionAction extension point.