Skip to content

Commit 63c6ba7

Browse files
committed
Add missing read action
1 parent f370d74 commit 63c6ba7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

idea/src/org/jetbrains/kotlin/idea/configuration/ConfigureKotlinInProjectUtils.kt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,25 @@ fun getCanBeConfiguredModulesWithKotlinFiles(project: Project, excludeModules: C
200200

201201
fun hasAnyKotlinRuntimeInScope(module: Module): Boolean {
202202
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
203-
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
204-
hasKotlinJsKjsmFile(module.project, scope) ||
205-
hasKotlinCommonRuntimeInScope(scope)
203+
return runReadAction {
204+
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
205+
hasKotlinJsKjsmFile(module.project, scope) ||
206+
hasKotlinCommonRuntimeInScope(scope)
207+
}
206208
}
207209

208210
fun hasKotlinJvmRuntimeInScope(module: Module): Boolean {
209-
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
210-
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null
211+
return runReadAction {
212+
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
213+
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null
214+
}
211215
}
212216

213217
fun hasKotlinJsRuntimeInScope(module: Module): Boolean {
214-
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
215-
return hasKotlinJsKjsmFile(module.project, scope)
218+
return runReadAction {
219+
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
220+
hasKotlinJsKjsmFile(module.project, scope)
221+
}
216222
}
217223

218224
fun hasKotlinCommonRuntimeInScope(scope: GlobalSearchScope): Boolean {

0 commit comments

Comments
 (0)