https://kotlinlang.org logo
d

Dima Avdeev

05/09/2020, 2:45 PM
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

Imran/Malic

05/26/2020, 1:00 PM
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

Dima Avdeev

06/01/2020, 9:11 AM
Thank's for answer!
👍🏽 1
8 Views