Misc: Make LibraryEffectiveKindProvider cache an instance property
This commit is contained in:
@@ -15,10 +15,8 @@ import com.intellij.openapi.roots.libraries.PersistentLibraryKind
|
|||||||
import com.intellij.util.containers.SoftFactoryMap
|
import com.intellij.util.containers.SoftFactoryMap
|
||||||
|
|
||||||
class LibraryEffectiveKindProviderImpl(project: Project) : LibraryEffectiveKindProvider {
|
class LibraryEffectiveKindProviderImpl(project: Project) : LibraryEffectiveKindProvider {
|
||||||
companion object {
|
private val effectiveKindMap = object : SoftFactoryMap<LibraryEx, PersistentLibraryKind<*>?>() {
|
||||||
private val effectiveKindMap = object : SoftFactoryMap<LibraryEx, PersistentLibraryKind<*>?>() {
|
override fun create(key: LibraryEx) = detectLibraryKind(key.getFiles(OrderRootType.CLASSES))
|
||||||
override fun create(key: LibraryEx) = detectLibraryKind(key.getFiles(OrderRootType.CLASSES))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
Reference in New Issue
Block a user