Remove unused modification tracker in KotlinClassInnerStuffCache
'dropCaches()' is not used anywhere both in the compiler and in the IDE.
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ open class KtLightClassForDecompiledDeclaration(
|
||||
|
||||
private val myInnersCache = KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
externalDependencies = listOf(KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker),
|
||||
dependencies = listOf(KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ abstract class FirLightClassBase protected constructor(manager: PsiManager) : Li
|
||||
|
||||
private val myInnersCache = KotlinClassInnerStuffCache(
|
||||
myClass = this@FirLightClassBase,
|
||||
externalDependencies = listOf(manager.project.createProjectWideOutOfBlockModificationTracker()),
|
||||
dependencies = listOf(manager.project.createProjectWideOutOfBlockModificationTracker()),
|
||||
lazyCreator = FirLightClassesLazyCreator(project)
|
||||
)
|
||||
|
||||
|
||||
+1
-9
@@ -6,7 +6,6 @@
|
||||
package org.jetbrains.kotlin.asJava.classes
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.util.SimpleModificationTracker
|
||||
import com.intellij.psi.*
|
||||
import com.intellij.psi.impl.PsiClassImplUtil
|
||||
import com.intellij.psi.impl.PsiImplUtil
|
||||
@@ -21,12 +20,9 @@ import org.jetbrains.kotlin.utils.SmartList
|
||||
|
||||
class KotlinClassInnerStuffCache(
|
||||
private val myClass: PsiExtensibleClass,
|
||||
externalDependencies: List<Any>,
|
||||
private val dependencies: List<Any>,
|
||||
private val lazyCreator: LazyCreator,
|
||||
) {
|
||||
private val myTracker = SimpleModificationTracker()
|
||||
private val dependencies: List<Any> = externalDependencies + myTracker
|
||||
|
||||
abstract class LazyCreator {
|
||||
abstract fun <T : Any> get(initializer: () -> T, dependencies: List<Any>): Lazy<T>
|
||||
}
|
||||
@@ -182,10 +178,6 @@ class KotlinClassInnerStuffCache(
|
||||
}
|
||||
}
|
||||
|
||||
fun dropCaches() {
|
||||
myTracker.incModificationCount()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val VALUES_METHOD = "values"
|
||||
private const val VALUE_OF_METHOD = "valueOf"
|
||||
|
||||
@@ -32,7 +32,7 @@ abstract class KtLightClassBase protected constructor(manager: PsiManager)
|
||||
: AbstractLightClass(manager, KotlinLanguage.INSTANCE), KtLightClass, PsiExtensibleClass {
|
||||
protected open val myInnersCache = KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
externalDependencies = listOf(KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker),
|
||||
dependencies = listOf(KotlinModificationTrackerService.getInstance(manager.project).outOfBlockModificationTracker),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ abstract class KtLightClassForSourceDeclaration(
|
||||
|
||||
override val myInnersCache: KotlinClassInnerStuffCache = KotlinClassInnerStuffCache(
|
||||
myClass = this,
|
||||
externalDependencies = classOrObject.getExternalDependencies(),
|
||||
dependencies = classOrObject.getExternalDependencies(),
|
||||
lazyCreator = LightClassesLazyCreator(project)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user