OPENIDE axiomjvm specifics enabled

(cherry picked from commit e3521c0ad2)
(cherry picked from commit 76d2fd5e6d)
This commit is contained in:
axiom
2026-08-06 12:10:36 +04:00
committed by Nikita Iarychenko
parent 8dfdf2c2b7
commit 9cf96ca92b
30 changed files with 146 additions and 47 deletions
@@ -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
@@ -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(
@@ -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) {
+9 -6
View File
@@ -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() +
@@ -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();
@@ -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() {
@@ -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()
}
@@ -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
}
@@ -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;
@@ -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
@@ -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"
}
@@ -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()
@@ -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
}
@@ -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()) {
@@ -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);
}
@@ -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"));
}
@@ -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();
@@ -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<MouseShortcut> {
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);
@@ -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
}
@@ -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
@@ -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 =
@@ -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
@@ -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) {
@@ -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();
}
+2
View File
@@ -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
@@ -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;
@@ -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
@@ -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")
@@ -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);
@@ -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)