I have a persistentstatecomponent where the file property of the storage annotation is set to "$MODULE_FILE$", but no data is saved to the iml. How do I do this? Also, is there a way to force a persistentstatecomponent to be saved?
A PersistentStateComponent doesn't save any state if its current state is equal to the default one. This behavior is by design, and please don't attempt to override it. ![]()
What do you mean, default? The PersistentStateComponent interface doesn't specify any method that returns the default state as far as I can see.
From what I understood, default values should be set in the constructor of the component.
The default state is the state which is produced by creating the state class (the type parameter you've specified for PersistentStateComponent) with its default constructor.
Ah, it was being saved to the wrong iml. How do I change that?
Is your PersistentStateComponent a module-level component or service?
It was listed under <module-components>. Although I just noticed a difference in my plugin.xml from the devkit plugin.xml I was referring to. I did not have
<option name="type" value="PLUGIN_MODULE"/>
I have to stop working on this plugin for the moment. Is there another plugin which uses persistentstatecomponent for a module component that I can use for reference?
Thanks for your help.