From ecf46bc2a8cb678b4e777a8b067b7763ecc73887 Mon Sep 17 00:00:00 2001 From: Nikita Iarychenko Date: Mon, 17 Mar 2025 13:28:19 +0400 Subject: [PATCH] OPENIDE ability download spell checking library was returned (cherry picked from commit 64a37b97935c95e005e68d0b8adfa16a11cadbac) --- .../ide-core/src/ru/openide/io/WhiteListUrls.kt | 3 ++- .../com/intellij/grazie/remote/LangDownloader.kt | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/platform/ide-core/src/ru/openide/io/WhiteListUrls.kt b/platform/ide-core/src/ru/openide/io/WhiteListUrls.kt index 68c71a50e9fd..5aaabf194ea6 100644 --- a/platform/ide-core/src/ru/openide/io/WhiteListUrls.kt +++ b/platform/ide-core/src/ru/openide/io/WhiteListUrls.kt @@ -58,7 +58,8 @@ object WhiteListUrls { "https://usage-stat.cuba-platform.com", "https://api.hsforms.com/submissions/v3/integration/submit/", "https://store.amplicode.ru", - "https://ls.store.amplicode.ru" + "https://ls.store.amplicode.ru", + "https://resources.openide.ru" ) // Collect urls from KnownSchemaIdentifiers.json diff --git a/plugins/grazie/src/main/kotlin/com/intellij/grazie/remote/LangDownloader.kt b/plugins/grazie/src/main/kotlin/com/intellij/grazie/remote/LangDownloader.kt index 0db022215d23..05de8199d203 100644 --- a/plugins/grazie/src/main/kotlin/com/intellij/grazie/remote/LangDownloader.kt +++ b/plugins/grazie/src/main/kotlin/com/intellij/grazie/remote/LangDownloader.kt @@ -36,7 +36,18 @@ internal object LangDownloader { } private fun runDownload(language: Lang, project: Project?): Path? { - return promptToSelectLanguageBundleManually(project, language) + try { + val presentableName = msg("grazie.settings.proofreading.languages.download.name", language.nativeName) + return ProgressManager.getInstance().runProcessWithProgressSynchronously( + { performDownload(language, presentableName) }, + presentableName, + false, + project + ) + } catch (exception: Throwable) { + thisLogger().warn(exception) + return promptToSelectLanguageBundleManually(project, language) + } } @Throws(IllegalStateException::class)