@@ -40,6 +40,7 @@ import com.jetbrains.gateway.ssh.IdeWithStatus
4040import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
4141import kotlinx.coroutines.CoroutineScope
4242import kotlinx.coroutines.Dispatchers
43+ import kotlinx.coroutines.async
4344import kotlinx.coroutines.cancel
4445import kotlinx.coroutines.launch
4546import kotlinx.coroutines.withContext
@@ -146,16 +147,18 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
146147 }
147148 } else {
148149 logger.info(" Resolved OS and Arch for ${selectedWorkspace.name} is: $workspaceOS " )
149- val installedIdes = withContext (Dispatchers .IO ) {
150+ val installedIdesJob = async (Dispatchers .IO ) {
150151 hostAccessor.getInstalledIDEs().map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .ALREADY_INSTALLED , null , ide.pathToIde, ide.presentableVersion, ide.remoteDevType) }
151152 }
152- val idesWithStatus = withContext (Dispatchers .IO ) {
153+ val idesWithStatusJob = async (Dispatchers .IO ) {
153154 IntelliJPlatformProduct .values()
154155 .filter { it.showInGateway }
155156 .flatMap { CachingProductsJsonWrapper .getInstance().getAvailableIdes(it, workspaceOS) }
156157 .map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .DOWNLOAD , ide.download, null , ide.presentableVersion, ide.remoteDevType) }
157158 }
158159
160+ val installedIdes = installedIdesJob.await()
161+ val idesWithStatus = idesWithStatusJob.await()
159162 if (installedIdes.isEmpty()) {
160163 logger.info(" No IDE is installed in workspace ${selectedWorkspace.name} " )
161164 } else {
0 commit comments