mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
code_completion.md: link Element Patterns
This commit is contained in:
parent
72094e2832
commit
82c6fcb57c
@ -32,7 +32,7 @@ Implementing the [`CompletionContributor`](upsource:///platform/analysis-api/src
|
||||
>
|
||||
{type="note"}
|
||||
|
||||
The core scenario of using [`CompletionContributor`](upsource:///platform/analysis-api/src/com/intellij/codeInsight/completion/CompletionContributor.java) consists of calling the `extend()` method and passing in the *pattern* specifying the context in which this completion variant is applicable, as well as a *completion provider* which generates the items to show in the completion list.
|
||||
The core scenario of using [`CompletionContributor`](upsource:///platform/analysis-api/src/com/intellij/codeInsight/completion/CompletionContributor.java) consists of calling the `extend()` method and passing in the [Element Pattern](element_patterns.md) specifying the context in which this completion variant is applicable, as well as a *completion provider* which generates the items to show in the completion list.
|
||||
|
||||
Keep in mind that the pattern is checked against the leaf PSI element.
|
||||
If you want to match a composite element, use `withParent()` or `withSuperParent()` methods.
|
||||
|
Loading…
x
Reference in New Issue
Block a user