Storing com.intellij.ui.table.TableView properties
Is there a way to store TableView properties like visible columns or columns width somehow automatically in configuration file? Does IDEA help somehow here?
What do store/storeWidth methods of BaseTableView do?
Please sign in to leave a comment.
Well, I found that table properties can be easily stored into com.intellij.util.config.*Storage objects using com.intellij.ui.table.BaseTableView *store/restore methods. It works at least for table *width *property.
The question is how to easily store Storage object in similar way as the plugin configuration can be stored just by implementing *PersistentStateComponent *in ApplicationComponent class.
In my case Storage is related to the Project so my question now is:
How to store (serialize/deserialize) automatically per-Project configuration?
Thanks for any hints.
So the answer for above question is that objects can be easily stored per project in the same way as per application just by implementing PersistentStateComponent interface.
The problem is that it works probably only for beans and Storage object is not compliant with that requirement. I get com.intellij.util.xmlb.XmlSerializationException when trying to put Storage object into configuration.
I will try to wrap it up and then serialize.
Works fine. Storage object just needs a wrapper which stores inner Storage properties in its own structure and provides getter and setter to be compliant with Idea serialization mechanism.