Is there a way to programmatically get the version of an IntelliJ IDEA plugin?
I'm creating my own IntelliJ IDEA plugin, and I have set the version property in the plugin.xml(e.g.:<version>3.1.1</version>
). I need to get the version to display in the "About" dialog of my plugin. Is there a way to get this value programmatically?
I'm new to IntelliJ IDEA plugin development, if there is a different way to display a version number please let me know.
Press Ctrl+Alt+S to open the IDE settings and select Plugins.
In the top bar where File, Edit, View... Are written, go to the Help section. Click on Help section and in the drop-down click on About. That will show you the information regarding the Intellij Version you are using.
Ctrl+Alt+Shift+N : finds a symbol. In IntelliJ IDEA, a symbol is any code element such as method, field, class, constant, and so on. Ctrl+Shift+A : finds an action by name. You can find any action even if it doesn't have a mapped shortcut or appear in the menu.
Here you go mate:
PluginManager.getPlugin(PluginId.getId("my.plugin.id")).getVersion();
Edit: from 2020, use
PluginManagerCore.getPlugin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With