From 35827107b5bccdd535b09237fe48ec5ec37bb4a3 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Tue, 3 Feb 2026 14:32:27 +0100 Subject: [PATCH 1/3] ALT-10966 compilation fixed --- gradle-252.properties | 3 --- gradle-253.properties | 3 --- 2 files changed, 6 deletions(-) diff --git a/gradle-252.properties b/gradle-252.properties index e7bec3895..ad938a0cf 100644 --- a/gradle-252.properties +++ b/gradle-252.properties @@ -8,6 +8,3 @@ ideaVersion=IU-2025.2.4 clionVersion=CL-2025.2.4 pycharmVersion=PC-2025.2.4 riderVersion=RD-2025.2.4 -# for running idea, pycharm, webstorm or android studio with plugins locally -# Path to pre-built plugin ZIP for runIde tasks (optional, overrides building from source) -localPluginPath=/Users/alexanderpetrov/Downloads/JetBrainsAcademy-2025.11-2025.2-994.zip diff --git a/gradle-253.properties b/gradle-253.properties index 6b9a0c1e5..7bd02e5ad 100644 --- a/gradle-253.properties +++ b/gradle-253.properties @@ -8,6 +8,3 @@ ideaVersion=IU-2025.3 clionVersion=CL-2025.3 pycharmVersion=PC-2025.3 riderVersion=RD-2025.3 -# for running idea, pycharm, webstorm or android studio with plugins locally -# Path to pre-built plugin ZIP for runIde tasks (optional, overrides building from source) -localPluginPath=/Users/alexanderpetrov/Downloads/JetBrainsAcademy-2025.11-2025.3-329.zip From 421a97284851b00c4434240973abf38df2005041 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Wed, 11 Feb 2026 15:57:38 +0100 Subject: [PATCH 2/3] ALT-10982 read lock acquisition moved inside getFormattedTaskText --- .../coursecreator/validation/CourseValidationHelper.kt | 3 ++- .../academy/learning/courseFormat/ext/TaskExt.kt | 6 ++++-- .../academy/learning/taskToolWindow/ui/TaskToolWindow.kt | 7 ++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/intellij-plugin/hs-core/src/org/hyperskill/academy/coursecreator/validation/CourseValidationHelper.kt b/intellij-plugin/hs-core/src/org/hyperskill/academy/coursecreator/validation/CourseValidationHelper.kt index 8c7f1beb1..15f4874d0 100644 --- a/intellij-plugin/hs-core/src/org/hyperskill/academy/coursecreator/validation/CourseValidationHelper.kt +++ b/intellij-plugin/hs-core/src/org/hyperskill/academy/coursecreator/validation/CourseValidationHelper.kt @@ -95,7 +95,8 @@ class CourseValidationHelper( } private suspend fun TestSuiteBuilder.validateTaskDescriptionLinks(project: Project, task: Task) { - val text = readAction { task.getFormattedTaskText(project) } ?: return + val text = task.getFormattedTaskText(project) + ?: return val links = extractLinks(project, task, text) // Don't create empty node if no links in the task description if (links.isEmpty()) return diff --git a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/TaskExt.kt b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/TaskExt.kt index f1f5cb4fa..26e28c06c 100644 --- a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/TaskExt.kt +++ b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/TaskExt.kt @@ -186,9 +186,11 @@ private fun VirtualFile.toDescriptionFormat(): DescriptionFormat = DescriptionFormat.values().firstOrNull { it.extension == extension } ?: loadingError(EduCoreBundle.message("yaml.editor.invalid.description")) -@RequiresReadLock fun Task.getFormattedTaskText(project: Project): String? { - var text = getTaskText(project) ?: return null + var text = runReadAction { + getTaskText(project) + } ?: return null + text = StringUtil.replace(text, "%IDE_NAME%", ApplicationNamesInfo.getInstance().fullProductName) val textBuffer = StringBuffer(text) replaceActionIDsWithShortcuts(textBuffer) diff --git a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/taskToolWindow/ui/TaskToolWindow.kt b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/taskToolWindow/ui/TaskToolWindow.kt index c5fdd3021..7a724229f 100644 --- a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/taskToolWindow/ui/TaskToolWindow.kt +++ b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/taskToolWindow/ui/TaskToolWindow.kt @@ -16,7 +16,6 @@ package org.hyperskill.academy.learning.taskToolWindow.ui import com.intellij.openapi.Disposable -import com.intellij.openapi.application.runReadAction import com.intellij.openapi.project.Project import com.intellij.openapi.util.registry.Registry import com.intellij.util.ui.update.MergingUpdateQueue @@ -65,10 +64,8 @@ abstract class TaskToolWindow(protected val project: Project) : Disposable { const val TASK_DESCRIPTION_UPDATE_DELAY_REGISTRY_KEY: String = "hyperskill.task.description.update.delay" fun getTaskDescription(project: Project, task: Task?, uiMode: JavaUILibrary): String { - val openedTask = task ?: return EduCoreBundle.message("label.open.task") - val taskText = runReadAction { - openedTask.getFormattedTaskText(project) - } ?: return EduCoreBundle.message("label.open.task") + val taskText = task?.getFormattedTaskText(project) + ?: return EduCoreBundle.message("label.open.task") val transformerContext = HtmlTransformerContext(project, task, uiMode) return TaskDescriptionTransformer.transform(taskText, transformerContext) } From 7a214d76372b14f4da2a3b9cb4df3759b7e157d0 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Wed, 11 Feb 2026 15:49:51 +0100 Subject: [PATCH 3/3] ALT-10982 inner directory access removed --- .../academy/learning/courseFormat/ext/StudyItemExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/StudyItemExt.kt b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/StudyItemExt.kt index 99aa03ae5..7ee1713ff 100644 --- a/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/StudyItemExt.kt +++ b/intellij-plugin/hs-core/src/org/hyperskill/academy/learning/courseFormat/ext/StudyItemExt.kt @@ -30,7 +30,7 @@ fun StudyItem.getDir(courseDir: VirtualFile): VirtualFile? { lessonParent.getDir(courseDir)?.findFileByRelativePath(lessonParent.getPathToChildren())?.findChild(name) } - is Task -> (parentOrNull as? Lesson)?.getDir(courseDir)?.let { findDir(it) } + is Task -> (parentOrNull as? Lesson)?.getDir(courseDir)?.findChild(name) else -> error("Can't find directory for the item $itemType") } }