mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[threading] IJPL-178581: Use Dispatchers.EDT instead of Dispatchers.Main
GitOrigin-RevId: a229eaa651f8480825ac1fe69ea47cdd9e88c96b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
36882b19f0
commit
cd0ef57c1e
+1
-1
@@ -50,7 +50,7 @@ private class ReviewToolwindowTabsManager<
|
||||
) {
|
||||
private val contentManager = toolwindow.contentManager
|
||||
private val projectVm = reviewToolwindowViewModel.projectVm
|
||||
private val cs = parentCs.childScope(Dispatchers.Main)
|
||||
private val cs = parentCs.childScope(Dispatchers.EDT)
|
||||
|
||||
init {
|
||||
contentManager.addDataProvider(EdtNoGetDataProvider { sink ->
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.coverage.actions
|
||||
|
||||
import com.intellij.coverage.CoverageIntegrationBaseTest
|
||||
import com.intellij.coverage.CoverageSuite
|
||||
import com.intellij.openapi.application.EDT
|
||||
import com.intellij.openapi.application.WriteIntentReadAction
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.ui.CheckboxTree
|
||||
@@ -88,7 +89,7 @@ class SuiteChooserTest : CoverageIntegrationBaseTest() {
|
||||
val dialog = openChooserDialog()
|
||||
collectSuiteNodes(dialog)[ijSuite]!!.isChecked = true
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
waitSuiteProcessing {
|
||||
WriteIntentReadAction.run {
|
||||
dialog.doOKAction()
|
||||
@@ -119,7 +120,7 @@ class SuiteChooserTest : CoverageIntegrationBaseTest() {
|
||||
suiteNodes[ijSuite]!!.isChecked = true
|
||||
suiteNodes[xmlSuite]!!.isChecked = true
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
waitSuiteProcessing {
|
||||
WriteIntentReadAction.run {
|
||||
dialog.doOKAction()
|
||||
@@ -156,7 +157,7 @@ class SuiteChooserTest : CoverageIntegrationBaseTest() {
|
||||
val suiteNodes = collectSuiteNodes(dialog)
|
||||
suiteNodes[ijSuite]!!.isChecked = false
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
WriteIntentReadAction.run {
|
||||
dialog.doOKAction()
|
||||
}
|
||||
@@ -180,7 +181,7 @@ class SuiteChooserTest : CoverageIntegrationBaseTest() {
|
||||
|
||||
Assert.assertFalse(manager.activeSuites().isEmpty())
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
val dialog = CoverageSuiteChooserDialog(myProject)
|
||||
dialog.NoCoverageAction().doAction(null)
|
||||
closeDialog(dialog)
|
||||
@@ -191,10 +192,10 @@ class SuiteChooserTest : CoverageIntegrationBaseTest() {
|
||||
}
|
||||
|
||||
private suspend fun openChooserDialog(): CoverageSuiteChooserDialog =
|
||||
withContext(Dispatchers.Main) { return@withContext CoverageSuiteChooserDialog(myProject) }
|
||||
withContext(Dispatchers.EDT) { return@withContext CoverageSuiteChooserDialog(myProject) }
|
||||
|
||||
private suspend fun closeDialog(dialog: CoverageSuiteChooserDialog) {
|
||||
withContext(Dispatchers.Main) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
Disposer.dispose(dialog.disposable)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ internal sealed class GHLoginDialog(
|
||||
override fun doValidateAll(): List<ValidationInfo> = loginPanel.doValidateAll()
|
||||
|
||||
override fun doOKAction() {
|
||||
cs.launch(Dispatchers.Main.immediate + ModalityState.stateForComponent(rootPane).asContextElement()) {
|
||||
cs.launch(Dispatchers.EDT + ModalityState.stateForComponent(rootPane).asContextElement()) {
|
||||
try {
|
||||
val (login, token) = loginPanel.acquireLoginAndToken()
|
||||
model.saveLogin(loginPanel.getServer(), login, token)
|
||||
|
||||
Reference in New Issue
Block a user