diff --git a/platform/core-api/src/com/intellij/openapi/application/RuntimeFlags.kt b/platform/core-api/src/com/intellij/openapi/application/RuntimeFlags.kt index 728f29f18931..1386bbd61a53 100644 --- a/platform/core-api/src/com/intellij/openapi/application/RuntimeFlags.kt +++ b/platform/core-api/src/com/intellij/openapi/application/RuntimeFlags.kt @@ -1,65 +1,60 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.application import org.jetbrains.annotations.ApiStatus /** - * - `false` means log an exception and proceed. - * - `true` means throw an exception. + * - `false` means log an exception and proceed + * - `true` means throw an exception */ @get:ApiStatus.Internal -val isMessageBusThrowsWhenDisposed: Boolean = - System.getProperty("ijpl.message.bus.throws.when.disposed", "true").toBoolean() +val isMessageBusThrowsWhenDisposed: Boolean = System.getProperty("ijpl.message.bus.throws.when.disposed", "true").toBoolean() /** - * - `false` means no implicit write intent lock for activities and coroutines - * - `true` means [IdeEventQueue] will wrap activities into write intent lock. + * - `false` means no implicit write-intent lock for activities and coroutines + * - `true` means `IdeEventQueue` will wrap activities with the write-intent lock */ @get:ApiStatus.Internal -val isCoroutineWILEnabled: Boolean = - System.getProperty("ide.coroutine.write.intent.lock", "true").toBoolean() +val isCoroutineWILEnabled: Boolean = System.getProperty("ide.coroutine.write.intent.lock", "true").toBoolean() /** * - `false` means exceptions from [com.intellij.util.messages.Topic] subscribers are being logged - * - `true` means exceptions from [com.intellij.util.messages.Topic] subscribers are being rethrown at [com.intellij.util.messages.MessageBus.syncPublisher] usages (the old behavior) + * - `true` means exceptions from [com.intellij.util.messages.Topic] subscribers are being rethrown + * at [com.intellij.util.messages.MessageBus.syncPublisher] usages (the old behavior) */ @get:ApiStatus.Internal -val isMessageBusErrorPropagationEnabled: Boolean = - System.getProperty("ijpl.message.bus.rethrows.errors.from.subscribers", "false").toBoolean() +val isMessageBusErrorPropagationEnabled: Boolean = System.getProperty("ijpl.message.bus.rethrows.errors.from.subscribers", "false").toBoolean() /** - * - `false` means lock permits are bound only to threads - * - `true` means lock permits also stored in coroutine contexts. + * - `false` means that lock permits are bound only to threads + * - `true` means that lock permits also stored in coroutine contexts */ @get:ApiStatus.Internal -val isLockStoredInContext: Boolean = - System.getProperty("ide.store.lock.in.context", "true").toBoolean() +val isLockStoredInContext: Boolean = System.getProperty("ide.store.lock.in.context", "true").toBoolean() /** - * `false` means that [backgroundWriteAction] will perform write actions from a non-modal context on a background thread. - * `true` means that [backgroundWriteAction] will perform write actions in and old way (on EDT). + * - `false` means that [backgroundWriteAction] will perform write actions from a non-modal context on a background thread + * - `true` means that [backgroundWriteAction] will perform write actions in and old way (on EDT) */ @ApiStatus.Internal val useBackgroundWriteAction: Boolean = System.getProperty("idea.background.write.action.enabled", "false").toBoolean() /** - * - `false` means wrong action chains are ignored and not reported. - * - `true` means chains of actions like `WriteIntentReadAction -> ReadAction -> WriteAction` will be reported as warnings. + * - `false` means wrong action chains are ignored and not reported + * - `true` means chains of actions like `WriteIntentReadAction -> ReadAction -> WriteAction` will be reported as warnings * - * Such reporting fails tests as I/O takes too, much time and tests timeouts. + * Such reporting fails tests as I/O takes too much time and tests timeouts. */ @get:ApiStatus.Internal val reportInvalidActionChains: Boolean = System.getProperty("ijpl.report.invalid.action.chains", "false").toBoolean() - /** - * - `false` means Application.invokeLater() with implicit ModalityState.any() is not reported. - * - `true` means Application.invokeLater() with implicit ModalityState.any() is reported as LOG.error(). + * - `false` means `Application.invokeLater()` calls with implicit `ModalityState.any()` are not reported + * - `true` means `Application.invokeLater()` calls with implicit `ModalityState.any()` are reported via `LOG.error()` */ @get:ApiStatus.Internal val reportInvokeLaterWithoutModality: Boolean = System.getProperty("ijpl.report.invoke.without.modal", "false").toBoolean() - /** * A flag that determines whether to apply user-interactive QoS (Quality of Service) settings for the Event Dispatch Thread (EDT). * diff --git a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ui.kt b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ui.kt index ce5360cc4c78..f3d117bc6bc8 100644 --- a/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ui.kt +++ b/platform/platform-impl/bootstrap/src/com/intellij/platform/ide/bootstrap/ui.kt @@ -176,7 +176,8 @@ private suspend fun replaceIdeEventQueue(isHeadless: Boolean) { // do not crash AWT on exceptions AWTExceptionHandler.register() } - if (!isHeadless && "true" == System.getProperty("idea.check.swing.threading")) { + + if (!isHeadless && System.getProperty("idea.check.swing.threading").toBoolean()) { span("repaint manager set") { RepaintManager.setCurrentManager(AssertiveRepaintManager()) } @@ -195,7 +196,7 @@ private suspend fun replaceIdeEventQueue(isHeadless: Boolean) { private fun blockATKWrapper() { // the registry must not be used here, because this method is called before application loading @Suppress("SpellCheckingInspection") - if (!SystemInfoRt.isLinux || !java.lang.Boolean.parseBoolean(System.getProperty("linux.jdk.accessibility.atkwrapper.block", "true"))) { + if (!SystemInfoRt.isLinux || !System.getProperty("linux.jdk.accessibility.atkwrapper.block", "true").toBoolean()) { return } @@ -210,7 +211,7 @@ private fun blockATKWrapper() { @VisibleForTesting fun checkHiDPISettings() { - if (!java.lang.Boolean.parseBoolean(System.getProperty("hidpi", "true"))) { + if (!System.getProperty("hidpi", "true").toBoolean()) { // suppress JRE-HiDPI mode System.setProperty("sun.java2d.uiScale.enabled", "false") }