registry
Use the IntelliJ Registry API for registry keys and feature flags.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Use the IntelliJ Registry API for registry keys and feature flags.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Create, amend, or rename IntelliJ commits and write compliant commit messages.
Create, amend, or rename IntelliJ commits and write compliant commit messages.
Write or review IntelliJ Kotlin coroutine code for structured concurrency: scope ownership, cancellation, failure propagation, leaked coroutines.
Write or review IntelliJ Kotlin coroutine code for structured concurrency: scope ownership, cancellation, failure propagation, leaked coroutines.
Design IntelliJ Swing UI components, state flow, EDT work, and lifecycle ownership.
Design IntelliJ Swing UI components, state flow, EDT work, and lifecycle ownership.
| name | registry |
| description | Use the IntelliJ Registry API for registry keys and feature flags. |
Guidelines for using the IntelliJ Registry API.
plugin.xml or registry.propertiesAlways prefer declaring in plugin.xml (not registry.properties):
<registryKey key="my.feature.enabled"
defaultValue="true"
description="Enables my feature"
restartRequired="false"/>
To override in a dependent plugin:
<registryKey key="my.feature.enabled"
defaultValue="false"
description="Enables my feature"
restartRequired="false"
overrides="true"/>
In suspending code:
val isEnabled = RegistryManager.getInstanceAsync().get("my.key")
In blocking code:
val isEnabled = RegistryManager.getInstance().get("my.key")
Access via Registry.get() or Registry.is() is effectively deprecated, since it might cause problems during early IDE startup.
Always prefer the RegistryManager when possible.
When code may run before COMPONENTS_LOADED state (e.g., during EULA dialog, splash screen),
you MUST use Registry.is(key, defaultValue) with an explicit default:
// Required for early startup code
Registry.`is`("my.key", false) // default must match registry.properties
How to find the default value:
community/platform/util/resources/misc/registry.properties<registryKey> declaration in plugin.xmlWhy: Registry.is(key) without default throws an exception if called before
LoadingState.COMPONENTS_LOADED. The safe overload returns the provided default
when Registry is not yet initialized.
For testing or run configurations:
-Dmy.registry.key=value
Use @RegistryKey annotation instead of Registry.get().setValue():
@Test
@RegistryKey(key = "my.registry.key", value = "true")
fun testWithRegistryEnabled() { ... }
See writing-tests.md for more test patterns.