We have created private marketplace plugin that connect to private Artifactory of the org and get the organization specific plugin and loads the plugin when the IntelliJ IDE is opened. One of the feature is when the IDE is opened the latest version of the plugin is download form the Artifactory if new version is available.
We are getting below error/ exception when multiple instance of IDE Is opened at the sometime and each instance of IDE is trying to download and install the latest version of the plugin at the sometime.
We are looking into some approaches
1. To Execute a one time process when a plugin is initially loaded - we want this to happen for one instance of the IDE only, i.e., if multiple instances of the IDE are opened, then the process should only execute once. Currently, when we run startup activity for a plugin, it runs once per instance of the IDE. Is there a thread that is run at the IDE global level rather than per instance that we could take advantage of? If not, what alternatives might we look at?`
2. Trigger an action when an IDE is brought into focus - i.e., if you have multiple instances of the IDE opened simultaneously, when we click on a particular instance is there a way to detect this focus event at the IDE instance level.
java.lang.Throwable: Assertion failed at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218)