[ULC] KtLightClassBase: do not override myInnersCache
^KT-56561
This commit is contained in:
committed by
Space Team
parent
aae0cf9e30
commit
f501259cd4
+11
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -18,10 +18,16 @@ import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
abstract class KtLightClassBase protected constructor(
|
||||
manager: PsiManager
|
||||
) : AbstractLightClass(manager, KotlinLanguage.INSTANCE), KtExtensibleLightClass {
|
||||
protected open val myInnersCache = KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
dependencies = listOf(KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
private val myInnersCache by lazyPub {
|
||||
KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
dependencies = cacheDependencies(),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
)
|
||||
}
|
||||
|
||||
protected open fun cacheDependencies(): List<Any> = listOf(
|
||||
KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker
|
||||
)
|
||||
|
||||
override fun getDelegate() =
|
||||
|
||||
+2
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -35,12 +35,7 @@ abstract class KtLightClassForSourceDeclaration(
|
||||
protected val jvmDefaultMode: JvmDefaultMode,
|
||||
) : KtLightClassBase(classOrObject.manager),
|
||||
StubBasedPsiElement<KotlinClassOrObjectStub<out KtClassOrObject>> {
|
||||
|
||||
override val myInnersCache: KotlinClassInnerStuffCache = KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
dependencies = classOrObject.getExternalDependencies(),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
)
|
||||
override fun cacheDependencies(): List<Any> = classOrObject.getExternalDependencies()
|
||||
|
||||
private val lightIdentifier = KtLightIdentifier(this, classOrObject)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user