IFT-518 Refactor: use PlatformUtils.isIntelliJ() instead of separate conditions

`PlatformUtils.isIntelliJ()` also true for IDEA EDU, but since it is not released anymore, it is ok to use this function to check for IDEA Community/Ultimate.

GitOrigin-RevId: 50b9b8e38ec7ba422d09e15f91b1c177f925c458
This commit is contained in:
Konstantin Hudyakov
2023-11-20 09:22:47 +02:00
committed by intellij-monorepo-bot
parent d56751ad9d
commit b04c281c69
2 changed files with 2 additions and 2 deletions

View File

@@ -14,5 +14,5 @@ class JavaOnboardingTourPromoter : OnboardingLessonPromoter(
get() = IconLoader.getIcon("img/idea-onboarding-tour.png", JavaOnboardingTourPromoter::class.java.classLoader)
override fun canCreatePromo(isEmptyState: Boolean): Boolean =
super.canCreatePromo(isEmptyState) && (PlatformUtils.isIdeaCommunity() || PlatformUtils.isIdeaUltimate())
super.canCreatePromo(isEmptyState) && PlatformUtils.isIntelliJ()
}

View File

@@ -34,7 +34,7 @@ class JavaLearningCourse : LearningCourseBase(JavaLanguage.INSTANCE.id) {
override fun modules(): List<IftModule> = onboardingTour() + stableModules() + CourseManager.instance.findCommonModules("Git")
private val isOnboardingLessonEnabled: Boolean
get() = PlatformUtils.isIdeaCommunity() || PlatformUtils.isIdeaUltimate()
get() = PlatformUtils.isIntelliJ()
private fun onboardingTour() = if (isOnboardingLessonEnabled) listOf(
LearningModule(id = "Java.Onboarding",