Add missing read action

This commit is contained in:
Dmitry Jemerov
2017-07-21 17:39:54 +02:00
parent f370d74609
commit 63c6ba7e31
@@ -200,19 +200,25 @@ fun getCanBeConfiguredModulesWithKotlinFiles(project: Project, excludeModules: C
fun hasAnyKotlinRuntimeInScope(module: Module): Boolean { fun hasAnyKotlinRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module)) val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null || return runReadAction {
hasKotlinJsKjsmFile(module.project, scope) || getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
hasKotlinCommonRuntimeInScope(scope) hasKotlinJsKjsmFile(module.project, scope) ||
hasKotlinCommonRuntimeInScope(scope)
}
} }
fun hasKotlinJvmRuntimeInScope(module: Module): Boolean { fun hasKotlinJvmRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module)) return runReadAction {
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null
}
} }
fun hasKotlinJsRuntimeInScope(module: Module): Boolean { fun hasKotlinJsRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module)) return runReadAction {
return hasKotlinJsKjsmFile(module.project, scope) val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
hasKotlinJsKjsmFile(module.project, scope)
}
} }
fun hasKotlinCommonRuntimeInScope(scope: GlobalSearchScope): Boolean { fun hasKotlinCommonRuntimeInScope(scope: GlobalSearchScope): Boolean {