mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJOB-26 Do now show Run and Debug lessons in Aqua
These lessons expect that `Current File` run configuration is available, but it is not enabled in Aqua. (cherry picked from commit 0412925c501f3234444702c5f6657078e83d5f30) IJ-CR-147744 GitOrigin-RevId: 67df76f1c9a5e71eaac90465944e7b894a47fd67
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a20b7d5efa
commit
e21d283581
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.java.ift
|
||||
|
||||
import com.intellij.execution.actions.RunConfigurationsComboBoxAction
|
||||
import com.intellij.java.ift.lesson.assistance.JavaEditorCodingAssistanceLesson
|
||||
import com.intellij.java.ift.lesson.basic.JavaContextActionsLesson
|
||||
import com.intellij.java.ift.lesson.basic.JavaSelectLesson
|
||||
@@ -15,6 +16,7 @@ import com.intellij.java.ift.lesson.refactorings.JavaRenameLesson
|
||||
import com.intellij.java.ift.lesson.run.JavaDebugLesson
|
||||
import com.intellij.java.ift.lesson.run.JavaRunConfigurationLesson
|
||||
import com.intellij.lang.java.JavaLanguage
|
||||
import com.intellij.openapi.project.ProjectManager
|
||||
import com.intellij.util.PlatformUtils
|
||||
import training.dsl.LessonUtil
|
||||
import training.learn.CourseManager
|
||||
@@ -141,17 +143,21 @@ class JavaLearningCourse : LearningCourseBase(JavaLanguage.INSTANCE.id) {
|
||||
JavaOccurrencesLesson(),
|
||||
)
|
||||
},
|
||||
LearningModule(id = "Java.RunAndDebug",
|
||||
name = LessonsBundle.message("run.debug.module.name"),
|
||||
description = LessonsBundle.message("run.debug.module.description"),
|
||||
primaryLanguage = langSupport,
|
||||
moduleType = LessonType.SINGLE_EDITOR) {
|
||||
listOf(
|
||||
JavaRunConfigurationLesson(),
|
||||
JavaDebugLesson(),
|
||||
)
|
||||
},
|
||||
)
|
||||
) + if (RunConfigurationsComboBoxAction.hasRunCurrentFileItem(ProjectManager.getInstance().defaultProject)) { // project doesn't matter in this check for us
|
||||
listOf(
|
||||
LearningModule(id = "Java.RunAndDebug",
|
||||
name = LessonsBundle.message("run.debug.module.name"),
|
||||
description = LessonsBundle.message("run.debug.module.description"),
|
||||
primaryLanguage = langSupport,
|
||||
moduleType = LessonType.SINGLE_EDITOR) {
|
||||
listOf(
|
||||
JavaRunConfigurationLesson(),
|
||||
JavaDebugLesson(),
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
else emptyList()
|
||||
|
||||
override fun getLessonIdToTipsMap(): Map<String, List<String>> = mutableMapOf(
|
||||
// Essential
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.python.featuresTrainer.ift
|
||||
|
||||
import com.intellij.util.PlatformUtils
|
||||
import com.jetbrains.python.PythonLanguage
|
||||
import com.intellij.execution.actions.RunConfigurationsComboBoxAction
|
||||
import com.intellij.openapi.project.ProjectManager
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.assistance.PythonEditorCodingAssistanceLesson
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.basic.PythonContextActionsLesson
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.basic.PythonSelectLesson
|
||||
@@ -19,6 +19,8 @@ import com.intellij.python.featuresTrainer.ift.lesson.refactorings.PythonRefacto
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.refactorings.PythonRenameLesson
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.run.PythonDebugLesson
|
||||
import com.intellij.python.featuresTrainer.ift.lesson.run.PythonRunConfigurationLesson
|
||||
import com.intellij.util.PlatformUtils
|
||||
import com.jetbrains.python.PythonLanguage
|
||||
import training.dsl.LessonUtil
|
||||
import training.learn.CourseManager
|
||||
import training.learn.LessonsBundle
|
||||
@@ -125,17 +127,21 @@ class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) {
|
||||
PythonRecentFilesLesson(),
|
||||
)
|
||||
},
|
||||
LearningModule(id = "Python.RunAndDebug",
|
||||
name = LessonsBundle.message("run.debug.module.name"),
|
||||
description = LessonsBundle.message("run.debug.module.description"),
|
||||
primaryLanguage = langSupport,
|
||||
moduleType = LessonType.SINGLE_EDITOR) {
|
||||
listOf(
|
||||
PythonRunConfigurationLesson(),
|
||||
PythonDebugLesson(),
|
||||
)
|
||||
},
|
||||
)
|
||||
) + if (RunConfigurationsComboBoxAction.hasRunCurrentFileItem(ProjectManager.getInstance().defaultProject)) { // project doesn't matter in this check for us
|
||||
listOf(
|
||||
LearningModule(id = "Python.RunAndDebug",
|
||||
name = LessonsBundle.message("run.debug.module.name"),
|
||||
description = LessonsBundle.message("run.debug.module.description"),
|
||||
primaryLanguage = langSupport,
|
||||
moduleType = LessonType.SINGLE_EDITOR) {
|
||||
listOf(
|
||||
PythonRunConfigurationLesson(),
|
||||
PythonDebugLesson(),
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
else emptyList()
|
||||
|
||||
override fun getLessonIdToTipsMap(): Map<String, List<String>> = mutableMapOf(
|
||||
// EditorBasics
|
||||
|
||||
Reference in New Issue
Block a user