mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 10:17:50 +08:00
IJSDK-1930 Plaform no longer increments root changes modification tracker on finish of Dumb mode
This commit is contained in:
parent
c2bcf74a42
commit
9944ead6c4
@ -21,6 +21,9 @@ _Early Access Program_ (EAP) releases of upcoming versions are available [here](
|
||||
Status bar widget for LSP servers
|
||||
: Language plugins using LSP can now provide their status for [](language_server_protocol.md#status-bar-integration).
|
||||
|
||||
Cached Values and Dumb Mode
|
||||
: Note change for [](psi_performance.md#projectRootManagerDependency).
|
||||
|
||||
### IntelliJ IDEA 2024.1
|
||||
|
||||
Unbundled plugins
|
||||
|
@ -43,3 +43,12 @@ To avoid paying this cost several times, the result of such computation can be c
|
||||
Usually, [`CachedValue`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/CachedValue.java) created with [`CachedValueManager`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java) works well for this purpose.
|
||||
|
||||
If the information you cache depends only on a subtree of the current PSI element (and nothing else: no resolve results or other files), you can cache it in a field in your `PsiElement` implementation and drop the cache in an override of `ASTDelegatePsiElement.subtreeChanged()`.
|
||||
|
||||
### Using `ProjectRootManager` as Dependency
|
||||
{id="projectRootManagerDependency"}
|
||||
|
||||
Since 2024.1, the platform no longer increments root changes modification tracker on finish of [](indexing_and_psi_stubs.md#dumb-mode).
|
||||
If cached values use [`ProjectRootManager`](%gh-ic%/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectRootManager.java) as dependency
|
||||
(without [`PsiModificationTracker`](%gh-ic%/platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java))
|
||||
and at the same time depend on [indexes](indexing_and_psi_stubs.md), a dependency on
|
||||
[`DumbService`](%gh-ic%/platform/core-api/src/com/intellij/openapi/project/DumbService.kt) must be added.
|
||||
|
Loading…
x
Reference in New Issue
Block a user