From 33c912edfa89f26d3d9877e94ba6291efc2a816c Mon Sep 17 00:00:00 2001 From: Elena Shaverdova Date: Mon, 4 Jul 2022 19:21:32 +0200 Subject: [PATCH] IDEA-294758 Rescan only changes GitOrigin-RevId: fdcc81362295bf2489af72b838c3538e31c95498 --- .../com/intellij/execution/AlternativeSdkRootsProvider.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/execution/impl/src/com/intellij/execution/AlternativeSdkRootsProvider.kt b/java/execution/impl/src/com/intellij/execution/AlternativeSdkRootsProvider.kt index 2c9ac4f45a97..c04016ba3fdc 100644 --- a/java/execution/impl/src/com/intellij/execution/AlternativeSdkRootsProvider.kt +++ b/java/execution/impl/src/com/intellij/execution/AlternativeSdkRootsProvider.kt @@ -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 { - ProjectRootManagerEx.getInstanceEx(project).makeRootsChange(EmptyRunnable.getInstance(), false, true) + ProjectRootManagerEx.getInstanceEx(project).makeRootsChange(EmptyRunnable.getInstance(), RootsChangeRescanningInfo.RESCAN_DEPENDENCIES_IF_NEEDED) } } }