List<JsonSchemaFileProvider> () { List<JsonSchemaProviderFactory> readyFactories = new ArrayList<>(); List<JsonSchemaProviderFactory> notReadyFactories = new ArrayList<>(); boolean dumb = DumbService.getInstance(myProject).isDumb(); for (JsonSchemaProviderFactory factory : getProviderFactories()) { if (!dumb || DumbService.isDumbAware(factory)) { readyFactories.add(factory); } else { notReadyFactories.add(factory); } } List<JsonSchemaFileProvider> providers = getProvidersFromFactories(readyFactories); myProviders = providers; if (!notReadyFactories.isEmpty() && !LightEdit.owns(myProject)) { ApplicationManager.getApplication().executeOnPooledThread(() -> { if (myProject.isDisposed()) return; DumbService.getInstance(myProject).runReadActionInSmartMode(() -> { if (myProviders == providers) { List<JsonSchemaFileProvider> newProviders = getProvidersFromFactories(notReadyFactories); if (!newProviders.isEmpty()) { List<JsonSchemaFileProvider> oldProviders = myProviders; myProviders = ContainerUtil.concat(oldProviders, newProviders); JsonSchemaServiceImpl.this.resetWithCurrentFactories(); } } }); }); } return providers; }