mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
refactor [platform]: support dynamic binding of PluginsState
GitOrigin-RevId: a248b602cacc7bd31f8a46a6d83b9b9883c9972a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b70fe3294a
commit
aa7b95e1d5
@@ -100,7 +100,8 @@ object PluginManagerCore {
|
||||
@JvmField
|
||||
var isUnitTestMode: Boolean = java.lang.Boolean.getBoolean("idea.is.unit.test")
|
||||
|
||||
private class PluginsMutableState {
|
||||
@ApiStatus.Internal
|
||||
class PluginsMutableState {
|
||||
@Volatile
|
||||
var nullablePluginSet: PluginSet? = null
|
||||
var pluginLoadingErrors: Map<PluginId, PluginNonLoadReason>? = null
|
||||
@@ -121,7 +122,12 @@ object PluginManagerCore {
|
||||
var ourBuildNumber: BuildNumber? = null
|
||||
}
|
||||
|
||||
private val pluginsState = PluginsMutableState()
|
||||
@ApiStatus.Internal
|
||||
var pluginsStateSupplier: (() -> PluginsMutableState)? = null
|
||||
|
||||
private val pluginsStateLazy = lazy { PluginsMutableState() }
|
||||
private val pluginsState
|
||||
get() = pluginsStateSupplier?.invoke() ?: pluginsStateLazy.value
|
||||
|
||||
/**
|
||||
* Returns `true` if the IDE is running from source code **without using 'dev build'**.
|
||||
|
||||
Reference in New Issue
Block a user