mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
IJSDK-250 Outdated revision message - PersistentStateComponent
This commit is contained in:
parent
a9c6ee8091
commit
7b2794b167
@ -14,7 +14,7 @@ Since all plugins share the same namespace, it is highly recommended to prefix k
|
||||
|
||||
## Using PersistentStateComponent
|
||||
|
||||
The [`com.intellij.openapi.components.PersistentStateComponent`](upsource:///platform/core-api/src/com/intellij/openapi/components/PersistentStateComponent.java) interface gives you the most flexibility for defining the values to be persisted, their format and storage location. In order to use it, you should mark a service or a component as implementing the `PersistentStateComponent` interface, define the state class, and specify the storage location using the `@com.intellij.openapi.components.State` annotation.
|
||||
The [`com.intellij.openapi.components.PersistentStateComponent`](upsource:///platform/projectModel-api/src/com/intellij/openapi/components/PersistentStateComponent.java) interface gives you the most flexibility for defining the values to be persisted, their format and storage location. In order to use it, you should mark a service or a component as implementing the `PersistentStateComponent` interface, define the state class, and specify the storage location using the `@com.intellij.openapi.components.State` annotation.
|
||||
|
||||
Note that instances of extensions cannot persist their state by implementing `PersistentStateComponent`. If your extension needs to have persistent state, you need to define a separate service responsible for managing that state.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user