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 {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
hasKotlinJsKjsmFile(module.project, scope) ||
hasKotlinCommonRuntimeInScope(scope)
return runReadAction {
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
hasKotlinJsKjsmFile(module.project, scope) ||
hasKotlinCommonRuntimeInScope(scope)
}
}
fun hasKotlinJvmRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
return getKotlinJvmRuntimeMarkerClass(module.project, scope) != null
return runReadAction {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null
}
}
fun hasKotlinJsRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
return hasKotlinJsKjsmFile(module.project, scope)
return runReadAction {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
hasKotlinJsKjsmFile(module.project, scope)
}
}
fun hasKotlinCommonRuntimeInScope(scope: GlobalSearchScope): Boolean {