From a62bcfc7c1136b9ab38ee365f41a44a85775f25c Mon Sep 17 00:00:00 2001 From: axiom Date: Fri, 7 Mar 2025 19:54:27 +0400 Subject: [PATCH] OPENIDE axiomjvm specifics enabled (cherry picked from commit d4ad367b22fad88ed09fb77e0b3d30e7d9f86ccc) --- .../src/com/intellij/ide/ui/AntialiasingType.java | 7 +++++-- .../src/com/intellij/ide/ui/UISettingsState.kt | 9 ++++++--- .../openapi/editor/colors/FontPreferences.java | 7 +++++-- platform/jbr/src/JdkEx.java | 15 +++++++++------ .../com/intellij/openapi/ui/DialogWrapper.java | 7 +++++-- .../com/intellij/ui/SimpleColoredComponent.java | 5 ++++- .../bootstrap/src/com/intellij/idea/IdeStarter.kt | 5 ++++- .../src/com/intellij/idea/SystemHealthMonitor.kt | 13 ++++++++----- .../src/com/intellij/internal/HidpiInfo.java | 7 +++++-- .../internal/focus/LogFocusRequestsAction.java | 7 +++++-- .../collectors/fus/os/SystemRuntimeCollector.kt | 8 ++++++-- .../intellij/diagnostic/PerformanceWatcherImpl.kt | 8 ++++++-- .../com/intellij/ide/ActiveWindowsWatcher.java | 7 +++++-- .../src/com/intellij/ide/ui/laf/LafManagerImpl.kt | 5 ++++- .../src/com/intellij/idea/inputMethodDisabler.kt | 7 +++++-- .../intellij/openapi/editor/impl/EditorImpl.java | 5 ++++- .../fileChooser/impl/LocalFileChooserFactory.java | 7 +++++-- .../openapi/keymap/impl/SystemShortcuts.java | 7 +++++-- .../keymap/impl/ui/MouseShortcutPanel.java | 7 +++++-- .../intellij/openapi/wm/impl/status/TextPanel.kt | 7 +++++-- .../src/com/intellij/ui/AppUIUtil.kt | 7 +++++-- .../com/intellij/ui/EnableMetalRenderingAction.kt | 9 ++++++--- .../src/com/intellij/ui/ExperimentalUIImpl.kt | 7 +++++-- .../src/com/intellij/util/Restarter.java | 5 ++++- .../src/com/intellij/util/ui/OwnerOptional.java | 7 +++++-- platform/util/api-dump-unreviewed.txt | 2 ++ platform/util/src/com/intellij/Patches.java | 7 +++++-- .../src/com/intellij/openapi/util/SystemInfo.java | 7 ++++++- .../util/ui/src/com/intellij/ui/JreHiDpiUtil.kt | 7 +++++-- .../com/intellij/ui/mac/foundation/MacUtil.java | 9 ++++++--- .../ui/src/com/intellij/ui/scale/JBUIScale.kt | 7 +++++-- 31 files changed, 160 insertions(+), 64 deletions(-) diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/AntialiasingType.java b/platform/editor-ui-api/src/com/intellij/ide/ui/AntialiasingType.java index 330d970e3380..f915f9d13eea 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/AntialiasingType.java +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/AntialiasingType.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ide.ui; import com.intellij.openapi.editor.PlatformEditorBundle; @@ -77,7 +80,7 @@ public enum AntialiasingType { } public @Nullable AATextInfo getTextInfo() { - return isEnabled || SystemInfo.isJetBrainsJvm ? GraphicsUtil.createAATextInfo(myHint) : null; + return isEnabled || SystemInfo.isIDEOptimizedJvm ? GraphicsUtil.createAATextInfo(myHint) : null; } @Override diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt index 57d3078e56af..410f109bb926 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettingsState.kt @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ide.ui import com.intellij.diagnostic.LoadingState @@ -220,9 +223,9 @@ class UISettingsState : BaseState() { var fullPathsInWindowHeader: Boolean by property(false) @get:OptionTag("BORDERLESS_MODE") var mergeMainMenuWithWindowTitle: Boolean by property( - (SystemInfo.isWin10OrNewer || (SystemInfo.isUnix && !SystemInfo.isMac)) && SystemInfo.isJetBrainsJvm) + (SystemInfo.isWin10OrNewer || (SystemInfo.isUnix && !SystemInfo.isMac)) && SystemInfo.isIDEOptimizedJvm) - var animatedScrolling: Boolean by property(!AppMode.isRemoteDevHost() && (!SystemInfoRt.isMac || !SystemInfo.isJetBrainsJvm)) + var animatedScrolling: Boolean by property(!AppMode.isRemoteDevHost() && (!SystemInfoRt.isMac || !SystemInfo.isIDEOptimizedJvm)) var animatedScrollingDuration: Int by property(getDefaultAnimatedScrollingDuration()) var animatedScrollingCurvePoints: Int by property( diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java index 57c2b05673ec..fe2adc964554 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/FontPreferences.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.editor.colors; import com.intellij.openapi.application.ApplicationManager; @@ -70,7 +73,7 @@ public class FontPreferences { } public static @NlsSafe String getDefaultFontName() { - if (SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isIDEOptimizedJvm) { return JETBRAINS_MONO; } if (SystemInfo.isWindows) { diff --git a/platform/jbr/src/JdkEx.java b/platform/jbr/src/JdkEx.java index 33f275ff14c1..b1e9a7343bc1 100644 --- a/platform/jbr/src/JdkEx.java +++ b/platform/jbr/src/JdkEx.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.platform.jbr; import com.intellij.openapi.diagnostic.Logger; @@ -26,14 +29,14 @@ public final class JdkEx { @SuppressWarnings("unused") public static @NotNull InputEventEx getInputEventEx() { - if (SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isIDEOptimizedJvm) { return new JBInputEventEx(); } return new DefInputEventEx(); } public static DisplayModeEx getDisplayModeEx() { - if (SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isIDEOptimizedJvm) { return new JBDisplayModeEx(); } return new DefDisplayModeEx(); @@ -90,7 +93,7 @@ public final class JdkEx { } public static void setIgnoreMouseEvents(@NotNull Window window, boolean ignoreMouseEvents) { - if (SystemInfo.isJetBrainsJvm && (SystemInfo.isMac || SystemInfo.isWindows)) { + if (SystemInfo.isIDEOptimizedJvm && (SystemInfo.isMac || SystemInfo.isWindows)) { window.setEnabled(false); try { MethodInvocator invocator = @@ -108,12 +111,12 @@ public final class JdkEx { private static @Nullable MethodInvocator getTabbingModeInvocator() { if ((ExperimentalUI.isNewUI() && !Registry.is("ide.mac.os.wintabs.version2", true)) || - !SystemInfo.isJetBrainsJvm || + !SystemInfo.isIDEOptimizedJvm || !SystemInfo.isMacOSBigSur || !Registry.is("ide.mac.bigsur.window.with.tabs.enabled", true)) { if (SystemInfoRt.isMac) { LOG.info("=== TabbingMode: disabled (" + - SystemInfo.isJetBrainsJvm + "," + + SystemInfo.isIDEOptimizedJvm + "," + SystemInfo.isMacOSBigSur + "," + Registry.is("ide.mac.bigsur.window.with.tabs.enabled") + "," + ExperimentalUI.isNewUI() + diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index 322504c11b2b..97500d73a395 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.ui; import com.intellij.CommonBundle; @@ -554,7 +557,7 @@ public abstract class DialogWrapper { protected @Nullable Border createContentPaneBorder() { if (getStyle() == DialogStyle.COMPACT) { if (/*(SystemInfoRt.isMac && Registry.is("ide.mac.transparentTitleBarAppearance", true)) ||*/ - (SystemInfoRt.isWindows && SystemInfo.isJetBrainsJvm)) { + (SystemInfoRt.isWindows && SystemInfo.isIDEOptimizedJvm)) { return JBUI.Borders.customLineTop(JBUI.CurrentTheme.CustomFrameDecorations.separatorForeground()); } return JBUI.Borders.empty(); diff --git a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java index 6c63ab6518b5..2a95a1a7a531 100644 --- a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java +++ b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ui; import com.github.benmanes.caffeine.cache.Cache; @@ -1126,7 +1129,7 @@ public class SimpleColoredComponent extends JComponent implements Accessible, Co public static int getTextBaseLine(@NotNull FontMetrics metrics, final int height) { // adding leading to ascent, just like in editor (leads to bad presentation for certain fonts with Oracle JDK, see IDEA-167541) return (height - metrics.getHeight() + 1) / 2 + metrics.getAscent() + - (SystemInfo.isJetBrainsJvm ? metrics.getLeading() : 0); + (SystemInfo.isIDEOptimizedJvm ? metrics.getLeading() : 0); } private @NotNull String logSwingPath() { diff --git a/platform/platform-impl/bootstrap/src/com/intellij/idea/IdeStarter.kt b/platform/platform-impl/bootstrap/src/com/intellij/idea/IdeStarter.kt index eb56ce3f6173..53edae2f9f66 100644 --- a/platform/platform-impl/bootstrap/src/com/intellij/idea/IdeStarter.kt +++ b/platform/platform-impl/bootstrap/src/com/intellij/idea/IdeStarter.kt @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.idea import com.intellij.accessibility.enableScreenReaderSupportIfNeeded @@ -271,7 +274,7 @@ private fun CoroutineScope.postOpenUiTasks() { TouchbarSupport.onApplicationLoaded() } } - else if (SystemInfoRt.isUnix && !SystemInfoRt.isMac && SystemInfo.isJetBrainsJvm) { + else if (SystemInfoRt.isUnix && !SystemInfoRt.isMac && SystemInfo.isIDEOptimizedJvm) { launch(CoroutineName("input method disabling on Linux")) { disableInputMethodsIfPossible() } diff --git a/platform/platform-impl/bootstrap/src/com/intellij/idea/SystemHealthMonitor.kt b/platform/platform-impl/bootstrap/src/com/intellij/idea/SystemHealthMonitor.kt index bb41b5b8a703..52f4ad30a4a3 100644 --- a/platform/platform-impl/bootstrap/src/com/intellij/idea/SystemHealthMonitor.kt +++ b/platform/platform-impl/bootstrap/src/com/intellij/idea/SystemHealthMonitor.kt @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.idea import com.intellij.diagnostic.VMOptions @@ -186,11 +189,11 @@ internal object SystemHealthMonitor { JavaVersion.current(), System.getProperty("java.vendor"), jreHome) } - // when can't detect a JBR version, give a user the benefit of the doubt - private fun isModernJBR(): Boolean { - if (!SystemInfo.isJetBrainsJvm) { - return false - } +// when can't detect a JBR version, give a user the benefit of the doubt +private fun isModernJBR(): Boolean { + if (!SystemInfo.isIDEOptimizedJvm) { + return false + } // when can't detect a JBR version, give a user the benefit of the doubt val jbrVersion = JdkVersionDetector.getInstance().detectJdkVersionInfo(PathManager.getBundledRuntimePath()) diff --git a/platform/platform-impl/internal/src/com/intellij/internal/HidpiInfo.java b/platform/platform-impl/internal/src/com/intellij/internal/HidpiInfo.java index 238bd4f77596..da7887f21565 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/HidpiInfo.java +++ b/platform/platform-impl/internal/src/com/intellij/internal/HidpiInfo.java @@ -1,4 +1,7 @@ -// Copyright 2000-2022 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.internal; import com.intellij.icons.AllIcons; @@ -105,7 +108,7 @@ final class HidpiInfo extends AnAction implements DumbAware { {USR_SCALE_TEXT, "" + JBUIScale.scale(1f), _USR_SCALE_DESC}, }; - if (SystemInfo.isLinux && SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isLinux && SystemInfo.isIDEOptimizedJvm) { try { Class cls = Class.forName("sun.awt.X11GraphicsDevice"); MethodInvocator getDpiInfo = new MethodInvocator(cls, "getDpiInfo"); diff --git a/platform/platform-impl/internal/src/com/intellij/internal/focus/LogFocusRequestsAction.java b/platform/platform-impl/internal/src/com/intellij/internal/focus/LogFocusRequestsAction.java index 9f49c8e12179..afe46482eb8e 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/focus/LogFocusRequestsAction.java +++ b/platform/platform-impl/internal/src/com/intellij/internal/focus/LogFocusRequestsAction.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.internal.focus; import com.intellij.diagnostic.logs.DebugLogLevel; @@ -27,7 +30,7 @@ final class LogFocusRequestsAction extends ToggleAction implements DumbAware { @Override public void update(@NotNull AnActionEvent e) { super.update(e); - e.getPresentation().setVisible(SystemInfo.isJetBrainsJvm); + e.getPresentation().setVisible(SystemInfo.isIDEOptimizedJvm); } @Override diff --git a/platform/platform-impl/internal/src/com/intellij/internal/statistic/collectors/fus/os/SystemRuntimeCollector.kt b/platform/platform-impl/internal/src/com/intellij/internal/statistic/collectors/fus/os/SystemRuntimeCollector.kt index fe20ea4cdbf9..f0dca664fcdd 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/statistic/collectors/fus/os/SystemRuntimeCollector.kt +++ b/platform/platform-impl/internal/src/com/intellij/internal/statistic/collectors/fus/os/SystemRuntimeCollector.kt @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.internal.statistic.collectors.fus.os import com.dynatrace.hash4j.hashing.Hashing @@ -37,7 +40,7 @@ import kotlin.math.roundToInt class SystemRuntimeCollector : ApplicationUsagesCollector() { private val COLLECTORS = listOf("Serial", "Parallel", "CMS", "G1", "Z", "Shenandoah", "Epsilon", "Other") private val ARCHITECTURES = listOf("x86", "x86_64", "arm64", "other", "unknown") - private val VENDORS = listOf("JetBrains", "Apple", "Oracle", "Sun", "IBM", "Azul", "Other") + private val VENDORS = listOf("JetBrains", "Apple", "Oracle", "Sun", "IBM", "Azul", "Axiom", "Other") private val VM_OPTIONS = listOf("Xmx", "Xms", "SoftRefLRUPolicyMSPerMB", "ReservedCodeCacheSize") private val SYSTEM_PROPERTIES = listOf("splash", "nosplash") private val RENDERING_PIPELINES = listOf("Metal", "OpenGL") @@ -181,6 +184,7 @@ class SystemRuntimeCollector : ApplicationUsagesCollector() { SystemInfo.isOracleJvm -> "Oracle" SystemInfo.isIbmJvm -> "IBM" SystemInfo.isAzulJvm -> "Azul" + SystemInfo.isAxiomJvm -> "Axiom" else -> "Other" } diff --git a/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcherImpl.kt b/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcherImpl.kt index 2b23c3638104..fcd3fc8c6c33 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcherImpl.kt +++ b/platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcherImpl.kt @@ -1,5 +1,9 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE") +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. +@file:Suppress("ReplaceGetOrSet", "JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE") + package com.intellij.diagnostic import com.intellij.featureStatistics.fusCollectors.LifecycleUsageTriggerCollector @@ -491,7 +495,7 @@ private suspend fun reportCrashesIfAny() { val pidFile = systemDir.resolve(PID_FILE_NAME) // TODO: check jre in app info, not the current // Only report if on JetBrains jre - if (SystemInfo.isJetBrainsJvm && Files.isRegularFile(appInfoFile) && Files.isRegularFile(pidFile)) { + if (SystemInfo.isIDEOptimizedJvm && Files.isRegularFile(appInfoFile) && Files.isRegularFile(pidFile)) { val crashInfo = withContext(Dispatchers.IO) { val pid = Files.readString(pidFile) val appInfoFileLastModified = Files.getLastModifiedTime(appInfoFile).toMillis() diff --git a/platform/platform-impl/src/com/intellij/ide/ActiveWindowsWatcher.java b/platform/platform-impl/src/com/intellij/ide/ActiveWindowsWatcher.java index 213cff873acf..a833a0645256 100644 --- a/platform/platform-impl/src/com/intellij/ide/ActiveWindowsWatcher.java +++ b/platform/platform-impl/src/com/intellij/ide/ActiveWindowsWatcher.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ide; import com.intellij.openapi.util.SystemInfo; @@ -81,7 +84,7 @@ public final class ActiveWindowsWatcher { } private static Window @NotNull [] getWindows(@NotNull Window w) { - if (SystemInfo.isMac && SystemInfo.isJetBrainsJvm && activatedWindows.size() > 1) { + if (SystemInfo.isMac && SystemInfo.isIDEOptimizedJvm && activatedWindows.size() > 1) { return activatedWindows.stream() .filter(window -> window == w || Foundation.invoke(MacUtil.getWindowFromJavaWindow(window), "isOnActiveSpace").booleanValue()) .toArray(Window[]::new); diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.kt b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.kt index 8c8b1336cd95..75fd9047e252 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.kt +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.kt @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("ReplacePutWithAssignment", "ReplaceGetOrSet") package com.intellij.ide.ui.laf @@ -1264,7 +1267,7 @@ private fun fixPopupWeight() { } private fun useInterFont(): Boolean { - return ((ExperimentalUI.isNewUI() && SystemInfo.isJetBrainsJvm) || Registry.`is`("ide.ui.font.force.use.inter.font", false)) + return ((ExperimentalUI.isNewUI() && SystemInfo.isIDEOptimizedJvm) || Registry.`is`("ide.ui.font.force.use.inter.font", false)) && !shouldFallbackToSystemFont } diff --git a/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt b/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt index 44d94b94b487..a2b4d431b848 100644 --- a/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt +++ b/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("ReplacePutWithAssignment") package com.intellij.idea @@ -40,7 +43,7 @@ private var IS_NOTIFICATION_REGISTERED = false @ApiStatus.Internal suspend fun disableInputMethodsIfPossible() { - if (SystemInfo.isWindows || SystemInfo.isMac || !SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isWindows || SystemInfo.isMac || !SystemInfo.isIDEOptimizedJvm) { return } diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index dfebcdf8413c..31342e2a4df7 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.editor.impl; import com.intellij.application.options.EditorFontsConstants; @@ -526,7 +529,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi updateCaretCursor(); - if (!ApplicationManager.getApplication().isHeadlessEnvironment() && SystemInfoRt.isMac && SystemInfo.isJetBrainsJvm) { + if (!ApplicationManager.getApplication().isHeadlessEnvironment() && SystemInfoRt.isMac && SystemInfo.isIDEOptimizedJvm) { MacGestureSupportInstaller.installOnComponent(getComponent(), e -> myForcePushHappened = true); } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileChooser/impl/LocalFileChooserFactory.java b/platform/platform-impl/src/com/intellij/openapi/fileChooser/impl/LocalFileChooserFactory.java index 216b43236392..4a0409b4e373 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileChooser/impl/LocalFileChooserFactory.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileChooser/impl/LocalFileChooserFactory.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.fileChooser.impl; import com.intellij.openapi.Disposable; @@ -89,7 +92,7 @@ public class LocalFileChooserFactory implements ClientFileChooserFactory { private static boolean canUseNativeDialog(FileChooserDescriptor descriptor) { return !descriptor.isForcedToUseIdeaFileChooser() && - SystemInfo.isJetBrainsJvm && + SystemInfo.isIDEOptimizedJvm && (SystemInfo.isWindows || SystemInfo.isMac) && (ApplicationManager.getApplication() == null || AdvancedSettings.getBoolean("ide.ui.native.file.chooser")); } diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/SystemShortcuts.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/SystemShortcuts.java index 684417621953..192ebefa2f29 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/SystemShortcuts.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/SystemShortcuts.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.keymap.impl; import com.intellij.execution.ExecutionException; @@ -368,7 +371,7 @@ public final class SystemShortcuts { private void readSystem() { myKeyStroke2SysShortcut.clear(); - if (!SystemInfo.isMac || !SystemInfo.isJetBrainsJvm || !Registry.is("read.system.shortcuts")) { + if (!SystemInfo.isMac || !SystemInfo.isIDEOptimizedJvm || !Registry.is("read.system.shortcuts")) { return; } diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/MouseShortcutPanel.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/MouseShortcutPanel.java index b9678fec4e2c..201ca0858a9b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/MouseShortcutPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/MouseShortcutPanel.java @@ -1,4 +1,7 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.keymap.impl.ui; import com.intellij.openapi.actionSystem.MouseShortcut; @@ -52,7 +55,7 @@ public final class MouseShortcutPanel extends ShortcutPanel { myClickCount = allowDoubleClick ? 2 : 1; addMouseListener(myMouseListener); addMouseWheelListener(myMouseListener); - if (SystemInfo.isMac && SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isMac && SystemInfo.isIDEOptimizedJvm) { new MacGestureSupportForMouseShortcutPanel(this, () -> myMouseShortcut = null); } setBackground(BACKGROUND); diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/TextPanel.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/TextPanel.kt index 393a4f6ac21d..f474e7264ed6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/TextPanel.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/TextPanel.kt @@ -1,4 +1,7 @@ -// Copyright 2000-2022 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("ReplaceGetOrSet") package com.intellij.openapi.wm.impl.status @@ -87,7 +90,7 @@ open class TextPanel @JvmOverloads constructor(private val toolTipTextSupplier: } var y = UIUtil.getStringY(s, bounds, g) - if (SystemInfo.isJetBrainsJvm && ExperimentalUI.isNewUI()) { + if (SystemInfo.isIDEOptimizedJvm && ExperimentalUI.isNewUI()) { // see SimpleColoredComponent.getTextBaseline y += fontMetrics.leading } diff --git a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt index 03bc17200ade..cbdb06b8ed47 100644 --- a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt +++ b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE", "ReplaceGetOrSet") package com.intellij.ui @@ -177,7 +180,7 @@ fun findAppIcon(): String? { // used in Rider fun isWindowIconAlreadyExternallySet(): Boolean { return when { - SystemInfoRt.isWindows -> java.lang.Boolean.getBoolean("ide.native.launcher") && SystemInfo.isJetBrainsJvm + SystemInfoRt.isWindows -> java.lang.Boolean.getBoolean("ide.native.launcher") && SystemInfo.isIDEOptimizedJvm // to prevent mess with java dukes when running from source SystemInfoRt.isMac -> isMacDocIconSet || !PluginManagerCore.isRunningFromSources() else -> false diff --git a/platform/platform-impl/src/com/intellij/ui/EnableMetalRenderingAction.kt b/platform/platform-impl/src/com/intellij/ui/EnableMetalRenderingAction.kt index 125012f17230..48c3df554297 100644 --- a/platform/platform-impl/src/com/intellij/ui/EnableMetalRenderingAction.kt +++ b/platform/platform-impl/src/com/intellij/ui/EnableMetalRenderingAction.kt @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ui import com.intellij.diagnostic.VMOptions @@ -6,7 +9,7 @@ import com.intellij.ide.ui.RegistryBooleanOptionDescriptor import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.project.DumbAwareToggleAction -import com.intellij.openapi.util.SystemInfo.isJetBrainsJvm +import com.intellij.openapi.util.SystemInfo.isIDEOptimizedJvm import com.intellij.openapi.util.SystemInfo.isMac internal class EnableMetalRenderingAction: DumbAwareToggleAction() { @@ -14,7 +17,7 @@ internal class EnableMetalRenderingAction: DumbAwareToggleAction() { override fun update(e: AnActionEvent) { super.update(e) - e.presentation.isEnabledAndVisible = isMac && isJetBrainsJvm && VMOptions.canWriteOptions() + e.presentation.isEnabledAndVisible = isMac && isIDEOptimizedJvm && VMOptions.canWriteOptions() } override fun isSelected(e: AnActionEvent): Boolean = diff --git a/platform/platform-impl/src/com/intellij/ui/ExperimentalUIImpl.kt b/platform/platform-impl/src/com/intellij/ui/ExperimentalUIImpl.kt index 3422c31956ec..e8a46d776781 100644 --- a/platform/platform-impl/src/com/intellij/ui/ExperimentalUIImpl.kt +++ b/platform/platform-impl/src/com/intellij/ui/ExperimentalUIImpl.kt @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("ReplaceGetOrSet", "ReplacePutWithAssignment") package com.intellij.ui @@ -191,7 +194,7 @@ private fun resetLafSettingsToDefault() { } private fun patchUiDefaultsForNewUi() { - if (SystemInfo.isJetBrainsJvm && EarlyAccessRegistryManager.getBoolean("ide.experimental.ui.inter.font")) { + if (SystemInfo.isIDEOptimizedJvm && EarlyAccessRegistryManager.getBoolean("ide.experimental.ui.inter.font")) { if (UISettings.getInstance().overrideLafFonts) { //todo[kb] add RunOnce NotRoamableUiSettings.getInstance().overrideLafFonts = false diff --git a/platform/platform-impl/src/com/intellij/util/Restarter.java b/platform/platform-impl/src/com/intellij/util/Restarter.java index 6dfd697fe500..eee4e2849300 100644 --- a/platform/platform-impl/src/com/intellij/util/Restarter.java +++ b/platform/platform-impl/src/com/intellij/util/Restarter.java @@ -1,4 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.util; import com.intellij.openapi.application.ApplicationNamesInfo; @@ -262,7 +265,7 @@ public final class Restarter { // this is required to support X server's focus stealing prevention mechanism, see JBR-2503 private static void setDesktopStartupId(ProcessBuilder processBuilder) { - if (SystemInfo.isJetBrainsJvm && StartupUiUtil.isXToolkit()) { + if (SystemInfo.isIDEOptimizedJvm && StartupUiUtil.isXToolkit()) { try { var lastUserActionTime = ReflectionUtil.getStaticFieldValue(Class.forName("sun.awt.X11.XBaseWindow"), long.class, "globalUserTime"); if (lastUserActionTime == null) { diff --git a/platform/platform-impl/src/com/intellij/util/ui/OwnerOptional.java b/platform/platform-impl/src/com/intellij/util/ui/OwnerOptional.java index 8f191d341ffe..e2639234bcf8 100644 --- a/platform/platform-impl/src/com/intellij/util/ui/OwnerOptional.java +++ b/platform/platform-impl/src/com/intellij/util/ui/OwnerOptional.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.util.ui; import com.intellij.ide.IdeEventQueue; @@ -25,7 +28,7 @@ public final class OwnerOptional { var owner = parent instanceof Window ? (Window)parent : SwingUtilities.getWindowAncestor(parent); if (IdeEventQueue.getInstance().getPopupManager().isPopupWindow(owner)) { - if (!owner.isFocused() || !SystemInfo.isJetBrainsJvm) { + if (!owner.isFocused() || !SystemInfo.isIDEOptimizedJvm) { do { owner = owner.getOwner(); } diff --git a/platform/util/api-dump-unreviewed.txt b/platform/util/api-dump-unreviewed.txt index 54553c4b3456..b5f3cd7e8fea 100644 --- a/platform/util/api-dump-unreviewed.txt +++ b/platform/util/api-dump-unreviewed.txt @@ -967,6 +967,8 @@ f:com.intellij.openapi.util.SystemInfo - sf:isI3:Z - sf:isIbmJvm:Z - sf:isJetBrainsJvm:Z +- sf:isAxiomJvm:Z +- sf:isIDEOptimizedJvm:Z - sf:isKDE:Z - sf:isLinux:Z - sf:isMac:Z diff --git a/platform/util/src/com/intellij/Patches.java b/platform/util/src/com/intellij/Patches.java index 2d2217db9b4c..c3535dab950a 100644 --- a/platform/util/src/com/intellij/Patches.java +++ b/platform/util/src/com/intellij/Patches.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij; import com.intellij.openapi.util.SystemInfo; @@ -44,5 +47,5 @@ public final class Patches { * JDK-8220231 */ @ReviseWhenPortedToJDK("13") - public static final boolean TEXT_LAYOUT_IS_SLOW = JavaVersion.current().feature == 12 && !SystemInfo.isJetBrainsJvm; + public static final boolean TEXT_LAYOUT_IS_SLOW = JavaVersion.current().feature == 12 && !SystemInfo.isIDEOptimizedJvm; } diff --git a/platform/util/src/com/intellij/openapi/util/SystemInfo.java b/platform/util/src/com/intellij/openapi/util/SystemInfo.java index 587b57a31a0c..afed107b283f 100644 --- a/platform/util/src/com/intellij/openapi/util/SystemInfo.java +++ b/platform/util/src/com/intellij/openapi/util/SystemInfo.java @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.openapi.util; import com.intellij.openapi.util.io.PathExecLazyValue; @@ -53,6 +56,8 @@ public final class SystemInfo { public static final boolean isIbmJvm = Strings.indexOfIgnoreCase(JAVA_VENDOR, "IBM", 0) >= 0; public static final boolean isAzulJvm = Strings.indexOfIgnoreCase(JAVA_VENDOR, "Azul", 0) >= 0; public static final boolean isJetBrainsJvm = Strings.indexOfIgnoreCase(JAVA_VENDOR, "JetBrains", 0) >= 0; + public static final boolean isAxiomJvm = Strings.indexOfIgnoreCase(JAVA_VENDOR, "Axiom", 0) >= 0; + public static final boolean isIDEOptimizedJvm = isJetBrainsJvm || isAxiomJvm; @SuppressWarnings("SpellCheckingInspection") private static boolean isCrostini() { diff --git a/platform/util/ui/src/com/intellij/ui/JreHiDpiUtil.kt b/platform/util/ui/src/com/intellij/ui/JreHiDpiUtil.kt index 53008c606cd8..3dcfd4b8e2e2 100644 --- a/platform/util/ui/src/com/intellij/ui/JreHiDpiUtil.kt +++ b/platform/util/ui/src/com/intellij/ui/JreHiDpiUtil.kt @@ -1,4 +1,7 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ui import com.intellij.openapi.diagnostic.thisLogger @@ -57,7 +60,7 @@ object JreHiDpiUtil { if (SystemInfoRt.isMac || StartupUiUtil.isWaylandToolkit()) { value = true } - else if (java.lang.Boolean.parseBoolean(System.getProperty("hidpi", "true")) && SystemInfo.isJetBrainsJvm) { + else if (java.lang.Boolean.parseBoolean(System.getProperty("hidpi", "true")) && SystemInfo.isIDEOptimizedJvm) { try { val graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment() val sunGraphicsEnvironmentClass = Class.forName("sun.java2d.SunGraphicsEnvironment") diff --git a/platform/util/ui/src/com/intellij/ui/mac/foundation/MacUtil.java b/platform/util/ui/src/com/intellij/ui/mac/foundation/MacUtil.java index 543edae32fab..41c8898fd21e 100644 --- a/platform/util/ui/src/com/intellij/ui/mac/foundation/MacUtil.java +++ b/platform/util/ui/src/com/intellij/ui/mac/foundation/MacUtil.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ui.mac.foundation; import com.intellij.openapi.Disposable; @@ -66,7 +69,7 @@ public final class MacUtil { if (w == null) { return ID.NIL; } - if (SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isIDEOptimizedJvm) { try { Object cPlatformWindow = getPlatformWindow(w); if (cPlatformWindow != null) { @@ -83,7 +86,7 @@ public final class MacUtil { } public static @Nullable Object getPlatformWindow(@NotNull Window w) { - if (SystemInfo.isJetBrainsJvm) { + if (SystemInfo.isIDEOptimizedJvm) { try { Class awtAccessor = Class.forName("sun.awt.AWTAccessor"); Object componentAccessor = awtAccessor.getMethod("getComponentAccessor").invoke(null); diff --git a/platform/util/ui/src/com/intellij/ui/scale/JBUIScale.kt b/platform/util/ui/src/com/intellij/ui/scale/JBUIScale.kt index f9abeb761cca..e5371e6e3ba7 100644 --- a/platform/util/ui/src/com/intellij/ui/scale/JBUIScale.kt +++ b/platform/util/ui/src/com/intellij/ui/scale/JBUIScale.kt @@ -1,4 +1,7 @@ -// 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. +// +// Modified by Dmitrij Pochepko at 2025 as part of the OpenIDE project (https://openide.ru). +// Any modifications are available on the same license terms as the original source code. @file:Suppress("LiftReturnOrAssignment") package com.intellij.ui.scale @@ -156,7 +159,7 @@ object JBUIScale { DEF_SYSTEM_FONT_SIZE = font.size / scale log?.info(String.format("DEF_SYSTEM_FONT_SIZE: %.2f", DEF_SYSTEM_FONT_SIZE)) } - else if (!SystemInfo.isJetBrainsJvm) { + else if (!SystemInfo.isIDEOptimizedJvm) { // With Oracle JDK: derive a scale from X server DPI, do not change DEF_SYSTEM_FONT_SIZE val size = DEF_SYSTEM_FONT_SIZE * getScreenScale() font = font.deriveFont(size)