Plugin initialization

Hi,

I would like to be able to register my own classloader as soon as my plugin is loaded. I'm currently doing it in an ApplicationComponent, but it looks like it is invoked "too late" in previous versions of IntelliJ (Android Studio, for example). I have intentionActions that rely on classes loaded by this classloader, but unfortunately those intentionActions are loaded before the ApplicationComponent.

Is it possible to run code earlier, just after my plugin has been instantiated for example?

Thanks.

1 comment

I tracked it down to AndroidInitialConfigurator, which loads GradleSpecificInitializer, which calls IntentionManager.getInstance(), which loads every intentions in my plugin, and all of this happens before my own ApplicationComponent is called.

Fortunately, I discovered an extension point named ApplicationLoadListener, which allows me to run code before components are loaded. Problem solved, it seems.

1

Please sign in to leave a comment.