Misc: Make LibraryEffectiveKindProvider cache an instance property

This commit is contained in:
Alexey Sedunov
2018-07-04 12:58:38 +03:00
parent db73ed1d0c
commit fc93f00c7b
@@ -15,10 +15,8 @@ import com.intellij.openapi.roots.libraries.PersistentLibraryKind
import com.intellij.util.containers.SoftFactoryMap
class LibraryEffectiveKindProviderImpl(project: Project) : LibraryEffectiveKindProvider {
companion object {
private val effectiveKindMap = object : SoftFactoryMap<LibraryEx, PersistentLibraryKind<*>?>() {
override fun create(key: LibraryEx) = detectLibraryKind(key.getFiles(OrderRootType.CLASSES))
}
private val effectiveKindMap = object : SoftFactoryMap<LibraryEx, PersistentLibraryKind<*>?>() {
override fun create(key: LibraryEx) = detectLibraryKind(key.getFiles(OrderRootType.CLASSES))
}
init {