Skip to content

Commit b80e8c2

Browse files
committed
Fix IDE resolving job not running in editor
And it still appears to work within Gateway as well. There might be other jobs we have to apply this fix to as well but for now I am taking them one at a time.
1 parent ef446f6 commit b80e8c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/com/coder/gateway/views/steps/CoderLocateRemoteProjectStepView.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import com.coder.gateway.withWorkspaceHostname
2525
import com.intellij.ide.IdeBundle
2626
import com.intellij.openapi.Disposable
2727
import com.intellij.openapi.application.ApplicationManager
28+
import com.intellij.openapi.application.ModalityState
29+
import com.intellij.openapi.application.asContextElement
2830
import com.intellij.openapi.diagnostic.Logger
2931
import com.intellij.openapi.ui.ComboBox
3032
import com.intellij.openapi.ui.ComponentValidator
@@ -181,7 +183,7 @@ class CoderLocateRemoteProjectStepView(private val setNextButtonEnabled: (Boolea
181183
titleLabel.text = CoderGatewayBundle.message("gateway.connector.view.coder.remoteproject.choose.text", selectedWorkspace.name)
182184
terminalLink.url = clientService.client.url.withPath("/@${clientService.me.username}/${selectedWorkspace.name}/terminal").toString()
183185

184-
ideResolvingJob = cs.launch {
186+
ideResolvingJob = cs.launch(ModalityState.current().asContextElement()) {
185187
try {
186188
val ides = suspendingRetryWithExponentialBackOff(
187189
action = { attempt ->

0 commit comments

Comments
 (0)