mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
annotator: mention language attribute
This commit is contained in:
parent
85af49d4ae
commit
cc3659f7ce
@ -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.
|
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.
|
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.
|
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.
|
The annotator can also provide quick fixes to problems it detects.
|
||||||
|
@ -65,7 +65,7 @@ Annotate the `simple:key` literal expression, and differentiate between a well-f
|
|||||||
|
|
||||||
## Register the Annotator
|
## 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
|
```xml
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user