void (@NotNull Project project) { if (!Registry.is("index.run.configuration.jre")) return; AlternativeSdkRootsProvider provider = Objects.requireNonNull(EP_NAME.findExtension(AlternativeSdkRootsProvider.class)); Collection<SyntheticLibrary> additionalProjectLibraries = provider.getAdditionalProjectLibraries(project); boolean update; synchronized (ALTERNATIVE_SDK_LIBS_KEY) { boolean res = additionalProjectLibraries != project.getUserData(ALTERNATIVE_SDK_LIBS_KEY); if (res) { project.putUserData(ALTERNATIVE_SDK_LIBS_KEY, additionalProjectLibraries); } update = res; } if (update) { AppUIUtil.invokeOnEdt(() -> WriteAction.run( () -> ProjectRootManagerEx.getInstanceEx(project).makeRootsChange( EmptyRunnable.getInstance(), RootsChangeRescanningInfo.RESCAN_DEPENDENCIES_IF_NEEDED))); } }