diff --git a/platform/ide-core/resources/messages/IdeCoreBundle.properties b/platform/ide-core/resources/messages/IdeCoreBundle.properties index f21979f19094..e28a64823351 100644 --- a/platform/ide-core/resources/messages/IdeCoreBundle.properties +++ b/platform/ide-core/resources/messages/IdeCoreBundle.properties @@ -40,8 +40,8 @@ inotify.instance.limit=The inotify(7) instances limit reached. More details. -file.synchronize.progress=Synchronizing files… -async.events.progress=Processing file events… +file.synchronize.progress=Synchronizing files\u2026 +async.events.progress=Processing file events\u2026 progress.title.doing.file.refresh.0=Doing file refresh. {0} filetype.idea.workspace.description=IDEA workspace @@ -55,15 +55,15 @@ error.connection.failed.status=Request failed with status code {0} cannot.load.remote.file=Cannot load ''{0}'': {1} cannot.create.local.file=Cannot create local file: {0} -download.progress.connecting=Connecting to ''{0}''… -download.progress.downloading=Downloading ''{0}''… +download.progress.connecting=Connecting to ''{0}''\u2026 +download.progress.downloading=Downloading ''{0}''\u2026 vfs.file.not.exist.error=''{0}'' does not exist in VFS vfs.target.already.exists.error=''{0}'' already exists in VFS vfs.target.not.directory.error=''{0}'' is not a directory in VFS cannot.delete.root.directory=Cannot delete root directory ''{0}'' progress.title.file.system.synchronization=File system synchronization -progress.text.processing.detected.file.changes=Processing {0} detected file {0,choice,1#change|2#changes}… +progress.text.processing.detected.file.changes=Processing {0} detected file {0,choice,1#change|2#changes}\u2026 macro.module.file.directory=The directory of the module file macro.module.file.path=The path to the module file @@ -146,9 +146,9 @@ proxy.old.way.label=You have JVM property {0} set to {1} progress.download.0.title=Downloading {0} -progress.download.file.text=Downloading ''{0}'' from ''{1}''… -progress.connecting.to.download.file.text=Connecting to ''{0}''… -progress.downloading.0.files.text=Downloading {0} {0, choice, 1#file|2#files}… +progress.download.file.text=Downloading ''{0}'' from ''{1}''\u2026 +progress.connecting.to.download.file.text=Connecting to ''{0}''\u2026 +progress.downloading.0.files.text=Downloading {0} {0, choice, 1#file|2#files}\u2026 dialog.directory.for.downloaded.files.title=Download Directory dialog.directory.for.downloaded.files.description=Downloaded files will be copied to selected directory error.file.download.failed=Failed to download ''{0}'':\n{1} @@ -159,3 +159,9 @@ unknown.error=Unknown error dialog.message.enter.password=Enter password: dialog.title.password=Password displays.a.password.input.dialog=Displays a password input dialog + +mac15.local.network.issue.title=MacOS X 15 Local Network Issue +mac15.local.network.issue.message=java.net.NoRouteToHostException: No route to host

See SUPPORT-A-564 for a possible solution. +mac15.local.network.issue.full.message=Cannot connect to remote host: java.net.NoRouteToHostException: No route to host
See SUPPORT-A-564 for a possible solution. +mac15.local.network.issue.notification.message=Cannot connect to remote host: java.net.NoRouteToHostException +mac15.local.network.issue.notification.button=Open Solution \ No newline at end of file diff --git a/platform/ide-core/src/com/intellij/util/io/NetUtils.kt b/platform/ide-core/src/com/intellij/util/io/NetUtils.kt new file mode 100644 index 000000000000..340c8e926d1a --- /dev/null +++ b/platform/ide-core/src/com/intellij/util/io/NetUtils.kt @@ -0,0 +1,39 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package com.intellij.util.io + +import com.intellij.ide.IdeCoreBundle +import com.intellij.notification.BrowseNotificationAction +import com.intellij.notification.Notification +import com.intellij.notification.NotificationType +import com.intellij.openapi.project.Project +import com.intellij.openapi.util.SystemInfo +import org.jetbrains.annotations.ApiStatus.Internal +import org.jetbrains.annotations.Nls +import java.net.NoRouteToHostException + +/** + * @author Alexander Lobas + */ +@Internal +object NetUtils { + private const val URL = "https://youtrack.jetbrains.com/articles/SUPPORT-A-564/Cannot-connect-to-remote-host-No-route-to-host-macOS-15-Sequoia" + + fun getNetworkErrorSolutionMessage(error: Throwable, full: Boolean): @Nls String? { + if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) { + return IdeCoreBundle.message(if (full) "mac15.local.network.issue.full.message" else "mac15.local.network.issue.message") + } + return null + } + + @Suppress("DialogTitleCapitalization") + fun showNetworkErrorSolutionNotification(error: Throwable, project: Project?) { + if (SystemInfo.isMacOSSequoia && error is NoRouteToHostException) { + Notification("Mac15 Local Network", + IdeCoreBundle.message("mac15.local.network.issue.title"), + IdeCoreBundle.message("mac15.local.network.issue.notification.message"), + NotificationType.INFORMATION) + .addAction(BrowseNotificationAction(IdeCoreBundle.message("mac15.local.network.issue.notification.button"), URL)) + .notify(project) + } + } +} \ No newline at end of file diff --git a/platform/platform-resources/src/META-INF/PlatformExtensions.xml b/platform/platform-resources/src/META-INF/PlatformExtensions.xml index 36289120562e..0e06963dcdcc 100644 --- a/platform/platform-resources/src/META-INF/PlatformExtensions.xml +++ b/platform/platform-resources/src/META-INF/PlatformExtensions.xml @@ -1579,6 +1579,7 @@ key="notification.group.failed.to.generate.module.descriptors"/> + diff --git a/platform/util/api-dump-unreviewed.txt b/platform/util/api-dump-unreviewed.txt index 4f2e706ee376..ef0c8b47bceb 100644 --- a/platform/util/api-dump-unreviewed.txt +++ b/platform/util/api-dump-unreviewed.txt @@ -967,6 +967,7 @@ f:com.intellij.openapi.util.SystemInfo - sf:isMacOSCatalina:Z - sf:isMacOSLeopard:Z - sf:isMacOSMonterey:Z +- sf:isMacOSSequoia:Z - sf:isMacOSSonoma:Z - sf:isMacOSVentura:Z - sf:isMacSystemMenu:Z diff --git a/platform/util/src/com/intellij/openapi/util/SystemInfo.java b/platform/util/src/com/intellij/openapi/util/SystemInfo.java index 250f0a8ef147..eaf29f42fc57 100644 --- a/platform/util/src/com/intellij/openapi/util/SystemInfo.java +++ b/platform/util/src/com/intellij/openapi/util/SystemInfo.java @@ -104,6 +104,7 @@ public final class SystemInfo { public static final boolean isMacOSMonterey = isMac && isOsVersionAtLeast("12.0"); public static final boolean isMacOSVentura = isMac && isOsVersionAtLeast("13.0"); public static final boolean isMacOSSonoma = isMac && isOsVersionAtLeast("14.0"); + public static final boolean isMacOSSequoia = isMac && isOsVersionAtLeast("15.0"); /** * Build number is the only more or less stable approach to get comparable Windows versions.