mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 17:57:53 +08:00
persisting_state_of_components.md: add dummy getInstance() method to code sample for clarification, #2
This commit is contained in:
parent
a77d8ab0ac
commit
3e201fbac3
@ -67,6 +67,11 @@ In the latter case, you can use the following pattern to implement `getState()`
|
||||
```java
|
||||
@State(...)
|
||||
class MyService implements PersistentStateComponent<MyService> {
|
||||
|
||||
public static MyService getInstance() {
|
||||
// implementation according to Application/Project level service
|
||||
}
|
||||
|
||||
public String stateValue;
|
||||
|
||||
public MyService getState() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user