Storing and retrieving user preferences
I am writing a custom plugin and having difficulty using the Plugin API to store/retrieve user preferences. I need to store a couple of basic fields like username, password, serverUrl. I've looked through the javadocs, API source, and online discussions. What is the correct way to do this? Do I have to deal with XML, JDomExternalizer, IPersistentStateComponent, and the like? Or is there a first class API that doesn't involve having to convert java to XML and worry about the underlying storage implementation. If the answer is "no", can someone please point me to a clear example of how this is done? Thanks in advance!
Please sign in to leave a comment.
Hello Nik,
I've just published an article describing the use of the PersistentStateComponent
API:
http://www.jetbrains.net/confluence/x/_QEqAQ
I think this qualifies as the first class API. :) Feel free to ask if you
have any additional questions.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
This is perfect. Thanks very much for your quick response!