As usual, it's much easier for us to answer such questions if we know what problem you're trying to solve. One possibility is AppLifecycleListener.appFrameCreated().
In that case I would simply start a pooled thread from the constructor of an ApplicationComponent. (It's essential that all network operations be performed from a background thread, in order not to block the startup of IntelliJ IDEA.)
As usual, it's much easier for us to answer such questions if we know what problem you're trying to solve. One possibility is AppLifecycleListener.appFrameCreated().
Some of my config are shared online. I need to sync with the server to make sure the local config is up-to-date.
IL
In that case I would simply start a pooled thread from the constructor of an ApplicationComponent. (It's essential that all network operations be performed from a background thread, in order not to block the startup of IntelliJ IDEA.)
When will this application componet be created?
ApplicationComponents are created when the splash screen is displayed, before the welcome screen is shown.
Thank you, Dmitry.
Happy new year :-)
IL
Are you sure?
It not works for me.
Here's my code:
class XComponent extends ApplicationComponent {
def initComponent() {
throw new Exception("init x")
}
def disposeComponent() {
}
val getComponentName = "X"
throw new Exception("create x")
}
<application-components>
<!-- Add your application components here -->
<component>
<implementation-class>sandbox.XComponent</implementation-class>
</component>
</application-components>
Yes, I am sure.