From 0cf2f5da233229f0ea33a4e34db9c124368b6227 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Thu, 13 Mar 2025 13:09:40 +0100 Subject: [PATCH] code_inspections_and_intentions.md: Cleanups --- .../code_inspections_and_intentions.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md b/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md index 431c8a80f..0c691c39b 100644 --- a/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md +++ b/topics/reference_guide/custom_language_support/code_inspections_and_intentions.md @@ -1,8 +1,8 @@ - + # Code Inspections and Intentions -Introduction to analysing the code and providing quick fixes for the found issues. +Introduction to analyzing the code and providing quick fixes for the found issues. @@ -12,7 +12,7 @@ -### Inspections +## Inspections The code inspections for custom languages use the same API as all other code inspections, based on the [`LocalInspectionTool`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInspection/LocalInspectionTool.java) class. @@ -25,21 +25,21 @@ The main differences are: If none of that is required and the analysis only needs to run in the active editor, [Annotator](syntax_highlighting_and_error_highlighting.md#annotator) provides better performance (because it supports incremental analysis) and more flexibility for highlighting errors. -See [Inspections](inspections.md) topic in the UI Guidelines on naming, writing description, and message texts for inspections. +> See the [guidelines](inspections.md) on naming, writing description, and message texts for inspections. **Examples:** - [Code Inspections Tutorial](code_inspections.md) -- A [simple inspection](%gh-ic%/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/codeInspection/TrailingSpacesInPropertyInspection.java) for [Properties language plugin](%gh-ic%/plugins/properties) +- A [simple inspection](%gh-ic%/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/codeInspection/TrailingSpacesInPropertyInspection.java) for the [Properties language plugin](%gh-ic%/plugins/properties) -> Please also note important change in 2024.1, refer to [](syntax_highlighting_and_error_highlighting.md#order-of-running-highlighting). +> See changes in the [order of running highlighting](syntax_highlighting_and_error_highlighting.md#order-of-running-highlighting) introduced in 2024.1. -#### Inspections Performance +### Inspections Performance A [custom language plugin](custom_language_support.md) providing many inspections (>100) can register the default [`PsiElementVisitor`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiElementVisitor.java) for its language in `com.intellij.inspection.basicVisitor` extension point to optimize processing. -### Intentions +## Intentions The code intentions for custom languages also use the standard API for intentions. The intention classes need to implement the [`IntentionAction`](%gh-ic%/platform/analysis-api/src/com/intellij/codeInsight/intention/IntentionAction.java) interface and are registered using the `com.intellij.intentionAction` extension point.