mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IFT-249 Disable onboarding tour and the promotion for PyCharm Edu
GitOrigin-RevId: 2a8eee85747ec1e8df311e69ef2ddfbe4761fe94
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ef5bde26c0
commit
ca3cd52098
@@ -1,10 +1,19 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python.training
|
||||
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
import com.intellij.openapi.util.IconLoader
|
||||
import training.ui.welcomeScreen.OnboardingLessonPromoter
|
||||
import javax.swing.Icon
|
||||
import javax.swing.JPanel
|
||||
|
||||
internal class PyOnboardingTourPromoter : OnboardingLessonPromoter("python.onboarding") {
|
||||
override fun promoImage(): Icon = IconLoader.getIcon("img/pycharm-onboarding-tour.png", PyOnboardingTourPromoter::class.java)
|
||||
|
||||
override fun getPromotionForInitialState(): JPanel? {
|
||||
if (ApplicationNamesInfo.getInstance().fullProductNameWithEdition.equals("PyCharm Edu")) {
|
||||
return null
|
||||
}
|
||||
return super.getPromotionForInitialState()
|
||||
}
|
||||
}
|
||||
@@ -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.jetbrains.python.ift
|
||||
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
import com.jetbrains.python.PythonLanguage
|
||||
import com.jetbrains.python.ift.lesson.assistance.PythonEditorCodingAssistanceLesson
|
||||
import com.jetbrains.python.ift.lesson.basic.PythonContextActionsLesson
|
||||
@@ -35,7 +36,9 @@ import training.learn.lesson.general.refactorings.ExtractVariableFromBubbleLesso
|
||||
class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) {
|
||||
override fun modules() = onboardingTour() + stableModules() + CourseManager.instance.findCommonModules("Git")
|
||||
|
||||
private fun onboardingTour() = listOf(
|
||||
private val disableOnboardingLesson get() = ApplicationNamesInfo.getInstance().fullProductNameWithEdition.equals("PyCharm Edu")
|
||||
|
||||
private fun onboardingTour() = if (!disableOnboardingLesson) listOf(
|
||||
LearningModule(name = PythonLessonsBundle.message("python.onboarding.module.name"),
|
||||
description = PythonLessonsBundle.message("python.onboarding.module.description", LessonUtil.productName),
|
||||
primaryLanguage = langSupport,
|
||||
@@ -43,6 +46,7 @@ class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) {
|
||||
listOf(PythonOnboardingTour())
|
||||
}
|
||||
)
|
||||
else emptyList()
|
||||
|
||||
private fun stableModules() = listOf(
|
||||
LearningModule(name = LessonsBundle.message("editor.basics.module.name"),
|
||||
|
||||
Reference in New Issue
Block a user