mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
refactor [platform]: dynamic registry
GitOrigin-RevId: 48bde01de8a36826eb90b35e2fb0b2d1c46f9065
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7c731d4ca3
commit
44860a567a
@@ -57,7 +57,14 @@ class Registry {
|
||||
private val EMPTY_VALUE_LISTENER: RegistryValueListener = object : RegistryValueListener {
|
||||
}
|
||||
|
||||
private val registry = Registry()
|
||||
private val staticRegistry by lazy { Registry() }
|
||||
|
||||
@set:Internal
|
||||
@get:Internal
|
||||
var registrySupplier: (() -> Registry)? = null
|
||||
|
||||
private val registry
|
||||
get() = registrySupplier?.invoke() ?: staticRegistry
|
||||
|
||||
@JvmStatic
|
||||
fun get(key: @NonNls String): RegistryValue = getInstance().resolveValue(key)
|
||||
|
||||
Reference in New Issue
Block a user