mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EDU-1146 add edu actions ids explicitly to show in empty editor
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
+8
-9
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user