From fbb336629ab65e96161c25fe102bdbec9feec423 Mon Sep 17 00:00:00 2001 From: "Aleksei.Luchinin" Date: Fri, 28 Jun 2024 18:19:57 +0300 Subject: [PATCH] Fix SlowOperations --- .../execution/configurations/TypeCheckRunState.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/arend/typechecking/execution/configurations/TypeCheckRunState.kt b/src/main/kotlin/org/arend/typechecking/execution/configurations/TypeCheckRunState.kt index 2ec17bbfe..fa78cac16 100644 --- a/src/main/kotlin/org/arend/typechecking/execution/configurations/TypeCheckRunState.kt +++ b/src/main/kotlin/org/arend/typechecking/execution/configurations/TypeCheckRunState.kt @@ -18,6 +18,7 @@ import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerUIActionsHandler import com.intellij.execution.testframework.sm.runner.ui.SMTestRunnerResultsForm import com.intellij.execution.ui.ConsoleView +import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.service import com.intellij.psi.PsiManager import org.arend.ext.module.ModulePath @@ -74,7 +75,13 @@ class TypeCheckRunState(private val environment: ExecutionEnvironment, private v NotificationErrorReporter(environment.project).report(ModuleNotFoundError(modulePath)) return null } - library.resetGroup(group) + ApplicationManager.getApplication().run { + executeOnPooledThread { + runReadAction { + library.resetGroup(group) + } + } + } } else { val scope = library?.moduleScopeProvider?.forModule(modulePath) ?: library?.testsModuleScopeProvider?.forModule(modulePath) if (library == null || scope == null) {