How to determine when IDE has started (including all plugins)?

Answered

Is there some callback to register or flag to check that IDE startup initialisation is finished?

0
5 comments
Avatar
Permanently deleted user

You can try implementing a class.  I don't think all plugins will be included in this, but you might be able to list and get or listen for each plugin status once you are there.

 

public class YourStartupActivity implements StartupActivity {

@Override
public void runActivity(@NotNull final Project project) {

}
}

In plugin.xml

`

<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
<postStartupActivity implementation="com.yourname.intellij.plugins.YourStartupActivity" />-->
</extensions>
0

From what I've seen in IJ source code "runActivity" is invoked per project and not exactly what I wanted.

0

It depends on what you mean by "started". There are many points in startup process, from showing splash to finishing indexing in all open projects. Please take a look at AppLifecycleListener, it might solve your problem.

0

Thank you. What I meant is a point in time when all app components of all plugins have been initialised.

The reason I have this question is that my plugin has optional dependency on a class from another plugin. I suppose the right thing is to add dependency tag in plugin.xml, e.g. <depends optional="true">SomeOtherPlugin</depends>.

0

appFrameCreated is called after all application components from all plugins have been initialized.

Yes, optional plugin dependencies should be specified like this.

0

Please sign in to leave a comment.