diff --git a/python/educational-python/src/com/jetbrains/python/edu/EduActitonIds.kt b/python/educational-python/src/com/jetbrains/python/edu/EduActitonIds.kt new file mode 100644 index 000000000000..2323da0da66e --- /dev/null +++ b/python/educational-python/src/com/jetbrains/python/edu/EduActitonIds.kt @@ -0,0 +1,14 @@ +@file:JvmName("EduActionIds") + + +package com.jetbrains.python.edu + +const val CHECK = "Educational.Check" +const val PREV_WINDOW = "Educational.PrevPlaceholder" +const val NEXT_WINDOW = "Educational.NextPlaceholder" +const val PREV_TASK = "Educational.PreviousTask" +const val NEXT_TASK = "Educational.NextTask" +const val REFRESH = "Educational.RefreshTaskFile" +const val HINT = "Educational.ShowHint" + + diff --git a/python/educational-python/src/com/jetbrains/python/edu/PyStudyInstructionPainter.java b/python/educational-python/src/com/jetbrains/python/edu/PyStudyInstructionPainter.java index 641183528a3a..374d615f39e1 100644 --- a/python/educational-python/src/com/jetbrains/python/edu/PyStudyInstructionPainter.java +++ b/python/educational-python/src/com/jetbrains/python/edu/PyStudyInstructionPainter.java @@ -4,7 +4,6 @@ import com.intellij.openapi.actionSystem.KeyboardShortcut; import com.intellij.openapi.fileEditor.impl.EditorEmptyTextPainter; import com.intellij.openapi.keymap.KeymapUtil; import com.intellij.util.ui.UIUtil; -import com.jetbrains.edu.learning.actions.*; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -14,14 +13,14 @@ public class PyStudyInstructionPainter extends EditorEmptyTextPainter { @Override protected void advertiseActions(@NotNull JComponent splitters, @NotNull UIUtil.TextPainter painter) { - String shortcut = KeymapUtil.getShortcutText(new KeyboardShortcut(KeyStroke.getKeyStroke(StudyNextWindowAction.SHORTCUT2), null)); + String shortcut = KeymapUtil.getShortcutText(new KeyboardShortcut(KeyStroke.getKeyStroke("ctrl pressed ENTER"), null)); appendAction(painter, "Navigate to the next answer placeholder", shortcut); - appendAction(painter, "Navigate between answer placeholders", getActionShortcutText(StudyPrevWindowAction.ACTION_ID) + separator + - getActionShortcutText(StudyNextWindowAction.ACTION_ID)); - appendAction(painter, "Navigate between tasks", getActionShortcutText(StudyPreviousTaskAction.ACTION_ID) + separator + - getActionShortcutText(StudyNextTaskAction.ACTION_ID)); - appendAction(painter, "Reset current task file", getActionShortcutText(StudyRefreshTaskFileAction.ACTION_ID)); - appendAction(painter, "Check task", getActionShortcutText(StudyCheckAction.ACTION_ID)); - appendAction(painter, "Get hint for the answer placeholder", getActionShortcutText(StudyShowHintAction.ACTION_ID)); + appendAction(painter, "Navigate between answer placeholders", getActionShortcutText(EduActionIds.PREV_WINDOW) + separator + + getActionShortcutText(EduActionIds.NEXT_WINDOW)); + appendAction(painter, "Navigate between tasks", getActionShortcutText(EduActionIds.PREV_TASK) + separator + + getActionShortcutText(EduActionIds.NEXT_TASK)); + appendAction(painter, "Reset current task file", getActionShortcutText(EduActionIds.REFRESH)); + appendAction(painter, "Check task", getActionShortcutText(EduActionIds.CHECK)); + appendAction(painter, "Get hint for the answer placeholder", getActionShortcutText(EduActionIds.HINT)); } } \ No newline at end of file