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 a528fb27ec4f..64094dd8d03b 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; @@ -80,7 +83,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 ba1d8d61be24..3ec816fc1398 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 @@ -224,9 +227,9 @@ class UISettingsState : BaseState() { var fullPathsInWindowHeader: Boolean by property(false) @get:OptionTag("BORDERLESS_MODE") var mergeMainMenuWithWindowTitle: Boolean by property( - (SystemInfo.isWin10OrNewer || (SystemInfoRt.isUnix && !SystemInfoRt.isMac)) && SystemInfo.isJetBrainsJvm) + (SystemInfo.isWin10OrNewer || (SystemInfoRt.isUnix && !SystemInfoRt.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 0f337ec9ef2d..d3f79ead602a 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-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; @@ -73,7 +76,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 4711ca0685fa..9e0633852664 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; @@ -29,14 +32,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(); @@ -93,7 +96,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 = @@ -111,12 +114,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 cac43f8a93a0..75e22cc0c30c 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-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; @@ -636,7 +639,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 d25a4ffa6db3..7063285b3441 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-2026 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; @@ -1161,7 +1164,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 8c1dd6dc0b0f..36fff7416167 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,9 @@ // Copyright 2000-2026 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.idea import com.intellij.accessibility.enableScreenReaderSupportIfNeeded @@ -297,7 +302,7 @@ private fun postOpenUiTasks(scope: CoroutineScope) { TouchbarSupport.onApplicationLoaded() } } - else if (OS.isGenericUnix() && SystemInfo.isJetBrainsJvm) { + else if (OS.isGenericUnix() && SystemInfo.isIDEOptimizedJvm) { scope.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 28ae1956833e..4773db013b51 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-2026 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 @@ -191,8 +194,9 @@ internal object SystemHealthMonitor { ) } + // when can't detect a JBR version, give a user the benefit of the doubt private fun isModernJBR(): Boolean { - if (!SystemInfo.isJetBrainsJvm) { + if (!SystemInfo.isIDEOptimizedJvm) { return false } 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 d31f9acb69db..059b64aa9f5a 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; 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 02bedf231bf3..a622a65d9c33 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-2026 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.intellij.diagnostic.VMOptions @@ -37,7 +40,7 @@ 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", "Vulkan", "Other") @@ -169,6 +172,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 f49afa3a4988..3ed5c119fac4 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", "UseOptimizedEelFunctions") +// +// 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", "UseOptimizedEelFunctions") + package com.intellij.diagnostic import com.intellij.diagnostic.PerformanceWatcherImpl.PerformanceWatcherSamplingTask @@ -728,7 +732,7 @@ private suspend fun reportCrashesIfAny() { val pidFile = systemDir.resolve(PID_FILE_NAME) // TODO: check JRE in application 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/ui/laf/LafManagerImpl.kt b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.kt index a17e17adfd0e..4177d5d4758a 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 @@ -1419,7 +1422,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 436dbdf02ae8..67eeb387c8f5 100644 --- a/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt +++ b/platform/platform-impl/src/com/intellij/idea/inputMethodDisabler.kt @@ -1,4 +1,9 @@ // Copyright 2000-2026 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 import com.intellij.ide.IdeBundle @@ -40,7 +45,7 @@ private var IS_NOTIFICATION_REGISTERED = false @ApiStatus.Internal suspend fun disableInputMethodsIfPossible() { - if (!OS.isGenericUnix() || !SystemInfo.isJetBrainsJvm) { + if (!OS.isGenericUnix() || !SystemInfo.isIDEOptimizedJvm) { return } if (StartupUiUtil.isWaylandToolkit()) { 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 bc11e4402da5..cb066af3d3f2 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-2026 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.CodeStyle; @@ -696,7 +699,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 31b5ef97dcb9..1be2c105638d 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.ide.impl.ProjectUtil; @@ -115,7 +118,7 @@ public class LocalFileChooserFactory implements ClientFileChooserFactory { } 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 fcab82308e1d..562564a31a4b 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 static final boolean DEBUG_SYSTEM_SHORTCUTS = Boolean.getBoolean("debug.system.shortcuts"); private static @Nullable com.jetbrains.SystemShortcuts getJbrApi() { - if (!SystemInfo.isMac || !SystemInfo.isJetBrainsJvm || !Registry.is("read.system.shortcuts")) { + if (!SystemInfo.isMac || !SystemInfo.isIDEOptimizedJvm || !Registry.is("read.system.shortcuts")) { return null; } return JBR.getSystemShortcuts(); 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 5cba0dea5ca3..66cd04d7d901 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 6c48dd5395d2..1a000ec5a531 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-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 @@ -103,7 +106,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 b8406cbe1a6a..8ca19d2e23ce 100644 --- a/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt +++ b/platform/platform-impl/src/com/intellij/ui/AppUIUtil.kt @@ -1,5 +1,9 @@ // Copyright 2000-2026 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("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE", "ReplaceGetOrSet") + package com.intellij.ui import com.intellij.diagnostic.ExceptionAutoReportUtil 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 9eb29675c717..2bd55de06006 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-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 @@ -189,7 +192,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 8d32e6e31f90..1fd93d92d5a1 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-2026 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; @@ -269,7 +272,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 2409636bbefc..1503689d2c31 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; @@ -29,7 +32,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 0f49ff649bb9..33fe8f7deb53 100644 --- a/platform/util/api-dump-unreviewed.txt +++ b/platform/util/api-dump-unreviewed.txt @@ -464,6 +464,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 fc7aff452567..00d6e5227860 100644 --- a/platform/util/src/com/intellij/Patches.java +++ b/platform/util/src/com/intellij/Patches.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; import com.intellij.util.system.OS; diff --git a/platform/util/src/com/intellij/openapi/util/SystemInfo.java b/platform/util/src/com/intellij/openapi/util/SystemInfo.java index 8aaa8568ce47..676f9ef31d57 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-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.text.StringUtil; @@ -62,6 +65,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; /** @deprecated use {@link OS#CURRENT} and {@link OS#isAtLeast} instead */ @Deprecated 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 ec96630915b3..c9c088d47eb6 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; @@ -75,7 +78,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) { @@ -92,7 +95,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 e5e0c22fb5e5..2b0f122602b8 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 @@ -167,7 +170,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)