Skip to content

Commit 7e74c9e

Browse files
committed
cs.launch for the ModuleDependencyServiceHandler
1 parent 3263ac9 commit 7e74c9e

File tree

1 file changed

+7
-1
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp

1 file changed

+7
-1
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ import com.intellij.openapi.util.Key
2121
import com.intellij.util.io.await
2222
import kotlinx.coroutines.CoroutineScope
2323
import kotlinx.coroutines.Deferred
24+
import kotlinx.coroutines.Dispatchers
2425
import kotlinx.coroutines.TimeoutCancellationException
2526
import kotlinx.coroutines.async
27+
import kotlinx.coroutines.launch
2628
import kotlinx.coroutines.runBlocking
2729
import kotlinx.coroutines.sync.Mutex
2830
import kotlinx.coroutines.sync.withLock
31+
import kotlinx.coroutines.withContext
2932
import kotlinx.coroutines.withTimeout
3033
import org.eclipse.lsp4j.ClientCapabilities
3134
import org.eclipse.lsp4j.ClientInfo
@@ -59,6 +62,7 @@ import java.io.PrintWriter
5962
import java.io.StringWriter
6063
import java.nio.charset.StandardCharsets
6164
import java.util.concurrent.Future
65+
import kotlin.coroutines.cancellation.CancellationException
6266
import kotlin.time.Duration.Companion.seconds
6367

6468
// https://github.com/redhat-developer/lsp4ij/blob/main/src/main/java/com/redhat/devtools/lsp4ij/server/LSPProcessListener.java
@@ -302,9 +306,11 @@ private class AmazonQServerInstance(private val project: Project, private val cs
302306
}
303307

304308
DefaultAuthCredentialsService(project, encryptionManager, this)
305-
DefaultModuleDependenciesService(project, this)
306309
TextDocumentServiceHandler(project, this)
307310
WorkspaceServiceHandler(project, this)
311+
cs.launch {
312+
DefaultModuleDependenciesService(project, this@AmazonQServerInstance)
313+
}
308314
}
309315

310316
override fun dispose() {

0 commit comments

Comments
 (0)