how to disable a plugin for the current session only
I have a plugin, which can fail during initialization (say, when Project SDK is not set). I want to show an error message to user and disable the plugin for the current session only.
The idea is that the user will configure the Project SDK and restart IDEA, then the plugin can initialize properly.
I see PluginManager.disablePlugin() will disable it permanently.
The reason why I want to disable the plugin in the first place is that we have a language parser and other stuff there, which would throw NPEs if not properly initialized.
Please sign in to leave a comment.
maybe we could throw something like "PluginInitException" to indicate that the plugin should be disabled for the current session
Hello Alexey,
There is no possibility to disable a plugin for a session. If we've already
started to load your plugin and run your initialization code, it's too late
to disable the rest of it anyway.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"