Skip to content

Commit 0971af8

Browse files
committed
Check for non-configured modules in background thread
#KT-17835 Fixed
1 parent e1f7c91 commit 0971af8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

idea/src/org/jetbrains/kotlin/idea/configuration/ui/KotlinConfigurationCheckerComponent.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.configuration.ui
1919
import com.intellij.ProjectTopics
2020
import com.intellij.notification.NotificationDisplayType
2121
import com.intellij.notification.NotificationsConfiguration
22+
import com.intellij.openapi.application.ApplicationManager
2223
import com.intellij.openapi.components.AbstractProjectComponent
2324
import com.intellij.openapi.project.DumbService
2425
import com.intellij.openapi.project.Project
@@ -56,9 +57,12 @@ class KotlinConfigurationCheckerComponent(project: Project) : AbstractProjectCom
5657
}
5758

5859
if (ConfigureKotlinNotificationManager.getVisibleNotifications(project).isNotEmpty()) {
59-
DumbService.getInstance(myProject).smartInvokeLater {
60+
ApplicationManager.getApplication().executeOnPooledThread {
61+
DumbService.getInstance(myProject).waitForSmartMode()
6062
if (getModulesWithKotlinFiles(project).all(::isModuleConfigured)) {
61-
ConfigureKotlinNotificationManager.expireOldNotifications(project)
63+
ApplicationManager.getApplication().invokeLater {
64+
ConfigureKotlinNotificationManager.expireOldNotifications(project)
65+
}
6266
}
6367
}
6468
}

0 commit comments

Comments
 (0)