How to get plugin installation path
Hello,
How can I obtain, at runtime, a path to where my plugin was installed?
I searched for it manually and it's something like: $HOME/.IdeaIC13/system/plugins-sandbox/plugins/MyPlugin
In Eclipse plugin development I achieve this via Bundle.getDataFile() and getting that file's path.
Thanks
Please sign in to leave a comment.
These are available statically, with some other useful operations, under com.intellij.openapi.application.PathManager
There are a bunch of VM properties set which contain this information - but use the statically typed wrapper as above :)
idea.config.path=..\.IntelliJIdea13\system\plugins-sandbox\config
idea.plugins.path=..\.IntelliJIdea13\system\plugins-sandbox\plugins
idea.system.path=..\.IntelliJIdea13\system\plugins-sandbox\system
Cheers,
Alan
Thanks.
PathManager.getPluginsPath() is the one.
Another method that also includes the plugin name in the path is: PluginManager.getPlugin(PluginId.getId("the plugin id")).getPath();