IDEA-294758 Rescan only changes

GitOrigin-RevId: fdcc81362295bf2489af72b838c3538e31c95498
This commit is contained in:
Elena Shaverdova
2022-07-20 15:39:46 +00:00
committed by intellij-monorepo-bot
parent c12b5adac9
commit 33c912edfa
@@ -1,9 +1,10 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.execution
import com.intellij.execution.configurations.ConfigurationWithAlternativeJre
import com.intellij.openapi.application.WriteAction
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.RootsChangeRescanningInfo
import com.intellij.openapi.projectRoots.ProjectJdkTable
import com.intellij.openapi.projectRoots.Sdk
import com.intellij.openapi.projectRoots.impl.jdkDownloader.JdkUpdateCheckContributor
@@ -81,7 +82,7 @@ class AlternativeSdkRootsProvider : AdditionalLibraryRootsProvider() {
if (update) {
AppUIUtil.invokeOnEdt {
WriteAction.run<RuntimeException> {
ProjectRootManagerEx.getInstanceEx(project).makeRootsChange(EmptyRunnable.getInstance(), false, true)
ProjectRootManagerEx.getInstanceEx(project).makeRootsChange(EmptyRunnable.getInstance(), RootsChangeRescanningInfo.RESCAN_DEPENDENCIES_IF_NEEDED)
}
}
}