Creating a Custom Profiler Plugin: Disabling Native Profiler in My Plugin
已回答
I am developing a plugin called MyProfiler for an idea. I hope it can replace the built-in profiler. However, I’ve encountered an issue: after users install my plugin and restart, I want it to disable the native profiler. The toolbar should only display my plugin, MyProfiler, and not the profiler. I’m unsure how to achieve this.
请先登录再写评论。
Hi,
I don't understand why you want to disable the existing profiler. It should be up to users which ones they want to use. They can use the built-in one for some tasks and your profiler for others.
Even if it was technically possible, it is not recommended to disable existing IDE features.
Hi,
currently using the profiler as an example is just to help everyone better understand this scenario. Actually, the profiler refers to an IDEA plugin that I have already developed.
I hope that after users install Plugin A, and then install Plugin B, Plugin A will be replaced. After Plugin B is disabled or uninstalled, Plugin A can still be displayed.
However, the current problem is that after installing Plugin A and restarting, then installing Plugin B and restarting, both Plugin A and Plugin B will appear simultaneously, even though I have disabled Plugin A during the “preLoading” phase(using com.intellij.ide.ApplicationInitializedListener). I hope there is a phase before preLoading where Plugin A can be disabled, so that Plugin A will not be registered and thus will not be displayed in the toolbar.
Hi,
Disabling other plugins must never be done.
ApplicationInitializedListener
is an internal API, which is forbidden to use by non-JetBrains plugins. It won't be approved on JetBrains Marketplace.Thank you so much