mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[maven] IDEA-356082 use Dispatchers.Default in linkAndRefreshGradleProject
GitOrigin-RevId: 39f78b2f4c9bbe2569dc08d6fc838326dbf95b9d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
386d635f2d
commit
ca59b640d0
+5
-1
@@ -15,6 +15,8 @@ import com.intellij.openapi.util.io.toCanonicalPath
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.platform.ide.progress.runWithModalProgressBlocking
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.ApiStatus.Obsolete
|
||||
import org.jetbrains.plugins.gradle.service.GradleInstallationManager
|
||||
@@ -50,7 +52,9 @@ fun canLinkAndRefreshGradleProject(projectFilePath: String, project: Project, sh
|
||||
fun linkAndRefreshGradleProject(projectFilePath: String, project: Project) {
|
||||
if (ApplicationManager.getApplication().isDispatchThread) {
|
||||
runWithModalProgressBlocking(project, GradleBundle.message("gradle.linking.project")) {
|
||||
GradleOpenProjectProvider().linkToExistingProjectAsync(projectFilePath, project)
|
||||
withContext(Dispatchers.Default) {
|
||||
GradleOpenProjectProvider().linkToExistingProjectAsync(projectFilePath, project)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user