Which extension point or listener is called upon t...
# intellij-plugins
d
Which extension point or listener is called upon the first launch or install of My plugin? I trying to use:
Copy code
<applicationListeners>
    <listener class="MyListener" topic="com.intellij.ide.plugins.DynamicPluginListener"/>
    <listener class="MyListener" topic="com.intellij.ide.plugins.PluginStateListener"/>
</applicationListeners>
but it don't handle my plugin, Also I try to check:
Copy code
InstalledPluginsState.getInstance().installedPlugins
But it don't contains my plugin. I want to execute some startup script only once - then IDE install my plugin, or plugin run first time
i
The earliest phase, where one can do something computationally interesting regarding the environment is
com.intellij.ide.ApplicationInitializedListener#componentsInitialized
it get’s called right after all the depending plugins of your Ide plugin are loaded and their services and component’s. There are also
PreloadingActivities
,
ApplicationListener
, depending on the lifecycle phase you’re trying to target.
If registering those doesn’t work in the plugin.xml. I would suggest registering a Listener early enough to register the corresponding Topic to the MessageBus.
d
Thank's for answer!
👍🏽 1