ScriptDefinitionsManager shouldn't be ready if definitions aren't initialized yet (KT-32554)
Otherwise this can lead to wrong script definition detection on project opening ^KT-32554 Fixed
This commit is contained in:
+4
-1
@@ -147,7 +147,10 @@ class ScriptDefinitionsManager(private val project: Project) : LazyScriptDefinit
|
||||
}
|
||||
|
||||
fun isReady(): Boolean {
|
||||
return definitionsBySource.keys.all { source ->
|
||||
if (definitions == null) {
|
||||
reloadScriptDefinitions()
|
||||
}
|
||||
return definitions != null && definitionsBySource.keys.all { source ->
|
||||
// TODO: implement another API for readiness checking
|
||||
(source as? ScriptDefinitionContributor)?.isReady() != false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user