Disable plugin
Answered
I'm trying to implement an activation check for my plugin. The idea is that you can't use my plugin if you haven't activated it. Where/how shall I implement that check and how would I disable the plugin and warn the user about the situation?
Please sign in to leave a comment.
See https://jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_components.html#application-startup for hooking into startup.
Use https://jetbrains.org/intellij/sdk/docs/user_interface_components/notifications.html#top-level-notifications for showing result.
Yann Cebron, do you know how to actually disable rhe plugin? I've hooked to appStarting() and appStarted(), trying with PluginManager.disablePlugin(), but I had no luck.
There is no safe way to disable a plugin via IDE. Users could also easily modify plugin.xml and remove startup check for activation from it.