syntax_highlighting_and_error_highlighting.md: DumbAware Annotator

This commit is contained in:
Yann Cébron 2023-02-01 18:04:12 +01:00
parent cb13c02526
commit 3fa3ba3685
2 changed files with 6 additions and 1 deletions

View File

@ -17,3 +17,6 @@ Nested Index Access
File Type Index Topic
: [`FileTypeIndex.IndexChangeListener`](%gh-ic-master%/platform/indexing-api/src/com/intellij/psi/search/FileTypeIndex.java) allows monitoring addition/removal of files by `FileType`.
Run Annotator During Indexing
: [Annotators](syntax_highlighting_and_error_highlighting.md#annotator) can implement `DumbAware` to run during indexing (e.g., providing additional syntax highlighting).

View File

@ -81,6 +81,8 @@ Annotators can analyze not only the syntax, but also the semantics using PSI, an
The annotator can also provide quick fixes to problems it detects.
When the file is changed, the annotator is called incrementally to process only changed elements in the PSI tree.
Annotators not requiring information from [indexes](indexing_and_psi_stubs.md) may implement [`DumbAware`](%gh-ic%/platform/core-api/src/com/intellij/openapi/project/DumbAware.java) to work during indexing (e.g., for additional [syntax highlighting](#syntax)). (2023.1+)
> See also [Code Inspections](code_inspections_and_intentions.md) which offer a more fine-grained control and some additional features.
>
{style="note"}
@ -113,7 +115,7 @@ Call `createWarningAnnotation()`/`createErrorAnnotation()` on the [`AnnotationHo
### Syntax
To apply additional syntax highlighting (2020.1 and later):
To apply additional syntax highlighting:
<tabs group="platform-version">