@@ -40,6 +40,7 @@ import com.jetbrains.gateway.ssh.IdeWithStatus
40
40
import com.jetbrains.gateway.ssh.IntelliJPlatformProduct
41
41
import kotlinx.coroutines.CoroutineScope
42
42
import kotlinx.coroutines.Dispatchers
43
+ import kotlinx.coroutines.async
43
44
import kotlinx.coroutines.cancel
44
45
import kotlinx.coroutines.launch
45
46
import kotlinx.coroutines.withContext
@@ -146,16 +147,18 @@ class CoderLocateRemoteProjectStepView(private val disableNextAction: () -> Unit
146
147
}
147
148
} else {
148
149
logger.info(" Resolved OS and Arch for ${selectedWorkspace.name} is: $workspaceOS " )
149
- val installedIdes = withContext (Dispatchers .IO ) {
150
+ val installedIdesJob = async (Dispatchers .IO ) {
150
151
hostAccessor.getInstalledIDEs().map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .ALREADY_INSTALLED , null , ide.pathToIde, ide.presentableVersion, ide.remoteDevType) }
151
152
}
152
- val idesWithStatus = withContext (Dispatchers .IO ) {
153
+ val idesWithStatusJob = async (Dispatchers .IO ) {
153
154
IntelliJPlatformProduct .values()
154
155
.filter { it.showInGateway }
155
156
.flatMap { CachingProductsJsonWrapper .getInstance().getAvailableIdes(it, workspaceOS) }
156
157
.map { ide -> IdeWithStatus (ide.product, ide.buildNumber, IdeStatus .DOWNLOAD , ide.download, null , ide.presentableVersion, ide.remoteDevType) }
157
158
}
158
159
160
+ val installedIdes = installedIdesJob.await()
161
+ val idesWithStatus = idesWithStatusJob.await()
159
162
if (installedIdes.isEmpty()) {
160
163
logger.info(" No IDE is installed in workspace ${selectedWorkspace.name} " )
161
164
} else {
0 commit comments