[Plugin Dev]How can I find this document ?

Hi All:
    I create a plugin to Setting someting, store it in a xml file, like following code .

        name = "go.GoSettings",
        storages = {
                @Storage(id="other", file = StoragePathMacros.APP_CONFIG+"/go_settings.xml")

The question is  I want read this document by other app, how can I find this xml file.


Comment actions Permalink

The persistance should be handled for you automatically. IE you should make use of the interface PersistentStateComponent<YourType> to handle this automatically.
So it is normal to not access this file directly, but instead work with the POJO it automagically unmarshals for you.

Please check here for some more information http://confluence.jetbrains.com/display/IDEADEV/Persisting+State+of+Components :)

Edit -- If you are wanting to access this across a different plugin, then you should be making use of a service to provide your configuration object across plugins. When you register a service, you will then be able to access your configuration with ServiceManager.getService(YourConfigurationClass.class);
Here is the documentation on services http://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+Plugin+Structure#IntelliJIDEAPluginStructure-PluginServices


Please sign in to leave a comment.