mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
noStateLoaded must be called even if store loading is disabled
GitOrigin-RevId: 4bf5dd70cdc8bebd0020c2fc278038fa43816a46
This commit is contained in:
committed by
intellij-monorepo-bot
parent
88f1533afb
commit
cbce49e7f7
@@ -349,9 +349,15 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
}
|
||||
|
||||
private fun initComponent(info: ComponentInfo, changedStorages: Set<StateStorage>?, reloadData: ThreeState): Boolean {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val component = info.component as PersistentStateComponent<Any>
|
||||
return when {
|
||||
loadPolicy == StateLoadPolicy.NOT_LOAD -> false
|
||||
doInitComponent(info, changedStorages, reloadData) -> {
|
||||
loadPolicy == StateLoadPolicy.NOT_LOAD -> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
component.noStateLoaded()
|
||||
false
|
||||
}
|
||||
doInitComponent(info, component, changedStorages, reloadData) -> {
|
||||
// if component was initialized, update lastModificationCount
|
||||
info.updateModificationCount()
|
||||
true
|
||||
@@ -360,10 +366,9 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
}
|
||||
}
|
||||
|
||||
private fun doInitComponent(info: ComponentInfo, changedStorages: Set<StateStorage>?, reloadData: ThreeState): Boolean {
|
||||
private fun doInitComponent(info: ComponentInfo, component: PersistentStateComponent<Any>, changedStorages: Set<StateStorage>?, reloadData: ThreeState): Boolean {
|
||||
val stateSpec = info.stateSpec!!
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val component = info.component as PersistentStateComponent<Any>
|
||||
|
||||
val name = stateSpec.name
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val stateClass: Class<Any> = when (component) {
|
||||
|
||||
Reference in New Issue
Block a user