How to share configuration data between two independent plugins Follow
How can I share configuration data between two plugins A and B that otherwise do not depend on each other. The configuration data should be accessible if one has installed A only, B only, or both A and B. I guess that rules out registering an JDOMExternalizable application component..?
Any ideas are highly appreciated! Thanks.
Please sign in to leave a comment.
I had exactly the same problem. Here is my solution, I'm not sure is it is
Following your example I added a third plugin called C.
In A & B plugin.xml I added the following dependency:
C Regards Boaz In plugin C i put the shared data simply be registering an JDOMExternalizable application component. This solution is also good for sharing code. "etienne" ]]> wrote in message
Interesting. Thanks for your thoughts.
Answering myself here...
The way I now share the configuration between two plugins is by reading/writing my own xml config file in the user's IDEA options folder.
String optionsPath = PathManager.getOptionsPath();
String filePath = optionsPath + File.separator + "myConfig.xml";
Concurrent access is not an issue, in my specific case.