Start read action at correct time (EA-105045)

This commit is contained in:
Dmitry Jemerov
2017-08-28 14:19:31 +02:00
parent f7f3bacc8e
commit f37cc9c8ef
@@ -204,8 +204,8 @@ fun getCanBeConfiguredModulesWithKotlinFiles(project: Project, excludeModules: C
}
fun hasAnyKotlinRuntimeInScope(module: Module): Boolean {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
return runReadAction {
val scope = module.getModuleWithDependenciesAndLibrariesScope(hasKotlinFilesOnlyInTests(module))
getKotlinJvmRuntimeMarkerClass(module.project, scope) != null ||
hasKotlinJsKjsmFile(module.project, LibraryKindSearchScope(module, scope, JSLibraryKind) ) ||
hasKotlinCommonRuntimeInScope(scope)