for the two ways of persisting

for the old way of persisting with JDOMExternalizable, default values and customized values are saved in different places, saying default values are saved in xml files and customizied values are saved in .ipr or .iml files, so the customized values won't overwrite the default values. But with the interface of PersistentStateComponent, default values and customized values are saved in the same files. If I changed the values, new values will overwrite the default values? And how to keep default values in PersistentStateComponent way? Thanks.
1 comment

PersistentStateComponent doesn't save default values in xml. Default values for its attributes are specified in field initializers in the state class.
Values of attributes are stored in project configuration xml-files (*.ipr, *.iml or *.xml file under .idea directory) only if they differ from the
default ones. See for more details.

Nikolay Chashnikov
"Develop with pleasure!"


Please sign in to leave a comment.