mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
code_completion.md: CompletionContributor mention DumbAware
This commit is contained in:
parent
fe6ce73c1a
commit
5fe4e0113b
@ -35,6 +35,7 @@ Violations are reported via [`IndexNotReadyException`](%gh-ic%/platform/core-api
|
||||
It also provides ways of delaying code execution until indexes are ready.
|
||||
|
||||
### `DumbAware` API
|
||||
{id="DumbAwareAPI"}
|
||||
|
||||
Implementations of certain [](plugin_extension_points.md) can be marked as available during Dumb Mode by implementing
|
||||
[`DumbAware`](%gh-ic%/platform/core-api/src/com/intellij/openapi/project/DumbAware.java).
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
|
||||
# Code Completion
|
||||
|
||||
@ -48,6 +48,8 @@ The core scenario of using [`CompletionContributor`](%gh-ic%/platform/analysis-a
|
||||
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.
|
||||
|
||||
If completion items do not depend on indexes (e.g., keywords), it can be marked as [dumb aware](indexing_and_psi_stubs.md#DumbAwareAPI).
|
||||
|
||||
**Examples**:
|
||||
- [`CompletionContributor`](%gh-ij-plugins%/osmorc/src/org/osmorc/manifest/completion/OsgiManifestCompletionContributor.java) for completing keywords in MANIFEST.MF files.
|
||||
- [Custom Language Support Tutorial: Completion Contributor](completion_contributor.md)
|
||||
|
Loading…
x
Reference in New Issue
Block a user