From 8fe2820ca8cd35c96384bb54409269837f8d7f26 Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Fri, 29 Nov 2024 20:52:51 +0100 Subject: [PATCH] IJPL-172106 Warn macOS 15 users about potential issues with OS firewall, suggest workarounds (cherry picked from commit 58808460d11744747923e61570cc0235b5e33d96) IJ-CR-150531 GitOrigin-RevId: ec5aec0b847815b5841369b56c5e25c8a0107963 --- platform/ide-core/src/com/intellij/util/io/NetUtils.kt | 3 ++- platform/util/resources/misc/registry.properties | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/ide-core/src/com/intellij/util/io/NetUtils.kt b/platform/ide-core/src/com/intellij/util/io/NetUtils.kt index 1e2ece9c5250..78d038adcf51 100644 --- a/platform/ide-core/src/com/intellij/util/io/NetUtils.kt +++ b/platform/ide-core/src/com/intellij/util/io/NetUtils.kt @@ -7,6 +7,7 @@ import com.intellij.notification.Notification import com.intellij.notification.NotificationType import com.intellij.openapi.project.Project import com.intellij.openapi.util.SystemInfo +import com.intellij.openapi.util.registry.Registry import org.jetbrains.annotations.ApiStatus.Internal import org.jetbrains.annotations.Nls import java.net.NoRouteToHostException @@ -26,7 +27,7 @@ object NetUtils { } fun showNetworkErrorSolutionNotification(error: Throwable, project: Project?) { - if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) { + if (Registry.`is`("mac15.local.network.issue", true) && SystemInfo.isMacOSSequoia && error is NoRouteToHostException) { Notification("Mac15 Local Network", IdeCoreBundle.message("mac15.local.network.issue.title"), IdeCoreBundle.message("mac15.local.network.issue.notification.message"), diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 686a97000bde..3a0722f625f5 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -2554,5 +2554,8 @@ highlighting.essential.should.restart.in.full.mode.on.save.all.description="Esse highlighting.essential.should.restart.in.full.mode.on.save.all=true highlighting.essential.should.restart.in.full.mode.on.save.all.description="Essential Mode" highlighting should re-highlight its current file in the full mode upon "Save All" action execution +mac15.local.network.issue=true +mac15.local.network.issue.description=Show notification "Local network issue" for macOs 15 + # please leave this note as last line # TODO please use EP com.intellij.registryKey for plugin/product specific keys