annotator: mention language attribute

This commit is contained in:
Yann Cébron 2022-08-10 16:31:19 +02:00
parent 85af49d4ae
commit cc3659f7ce
2 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ See [](syntax_errors.md) on how to programmatically suppress these errors in cer
The third level of highlighting is performed through the [`Annotator`](upsource:///platform/analysis-api/src/com/intellij/lang/annotation/Annotator.java) interface.
A plugin can register one or more annotators in the `com.intellij.annotator` extension point, and these annotators are called during the background highlighting pass to process the elements in the custom language's PSI tree.
Attribute `language` should be set to the Language ID where this annotatr applies to.
Annotators can analyze not only the syntax, but also the semantics using PSI, and thus can provide much more complex syntax and error highlighting logic.
The annotator can also provide quick fixes to problems it detects.

View File

@ -65,7 +65,7 @@ Annotate the `simple:key` literal expression, and differentiate between a well-f
## Register the Annotator
Using the `com.intellij.annotator` extension point in the plugin configuration file, register the Simple Language annotator class with the IntelliJ Platform:
Using the `com.intellij.annotator` extension point in the plugin configuration file, register the Simple Language annotator class for `JAVA` language:
```xml
<extensions defaultExtensionNs="com.intellij">