mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
OPENIDE axiomjvm specifics enabled
(cherry picked from commit d4ad367b22fad88ed09fb77e0b3d30e7d9f86ccc)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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() +
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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-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"
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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-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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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-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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
* <a href="https://bugs.openjdk.org/browse/JDK-8220231">JDK-8220231</a>
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user