From c3a34a3b1779d7a3f0ea0f8ad197029f9ec2ed29 Mon Sep 17 00:00:00 2001 From: Alexey Merkulov Date: Tue, 16 Aug 2022 16:22:47 +0200 Subject: [PATCH] [IFT] Remove unused icon and regenerate FeaturesTrainerIcons class IJ-CR-94315 GitOrigin-RevId: cb0b8119f504d082b1466c3b4ca41eeb71ee550a --- .../essential/JavaOnboardingTourLesson.kt | 2 +- .../res/META-INF/plugin.xml | 4 +- .../res/learnProjects/.idea/icon.png | Bin 782 -> 0 bytes .../src/training/FeaturesTrainerIcons.java | 39 ++++++------------ .../training/actions/RestartLessonAction.kt | 2 +- .../general/assistance/LocalHistoryLesson.kt | 2 +- .../general/navigation/RecentFilesLesson.kt | 2 +- .../statistic/LearnProjectStateListener.kt | 2 +- .../src/training/ui/IftTipAndTrickPromoter.kt | 2 +- .../src/training/ui/LessonMessagePane.kt | 2 +- .../src/training/ui/OnboardingFeedbackForm.kt | 4 +- .../src/training/ui/views/LearningItems.kt | 2 +- .../ui/welcomeScreen/IFTInteractiveCourse.kt | 2 +- .../welcomeScreen/OnboardingLessonPromoter.kt | 2 +- .../training/simple/MessageFactoryTest.kt | 4 +- .../essensial/PythonOnboardingTourLesson.kt | 2 +- 16 files changed, 30 insertions(+), 43 deletions(-) delete mode 100644 plugins/ide-features-trainer/res/learnProjects/.idea/icon.png diff --git a/java/java-features-trainer/src/com/intellij/java/ift/lesson/essential/JavaOnboardingTourLesson.kt b/java/java-features-trainer/src/com/intellij/java/ift/lesson/essential/JavaOnboardingTourLesson.kt index 12bf1027974c..22f8e6b49441 100644 --- a/java/java-features-trainer/src/com/intellij/java/ift/lesson/essential/JavaOnboardingTourLesson.kt +++ b/java/java-features-trainer/src/com/intellij/java/ift/lesson/essential/JavaOnboardingTourLesson.kt @@ -201,7 +201,7 @@ class JavaOnboardingTourLesson : KLesson("java.onboarding", JavaLessonsBundle.me LessonUtil.returnToWelcomeScreenRemark())) .yesText(JavaLessonsBundle.message("java.onboarding.finish.exit")) .noText(JavaLessonsBundle.message("java.onboarding.finish.modules")) - .icon(FeaturesTrainerIcons.Img.PluginIcon) + .icon(FeaturesTrainerIcons.PluginIcon) .show(project) when (result) { diff --git a/plugins/ide-features-trainer/res/META-INF/plugin.xml b/plugins/ide-features-trainer/res/META-INF/plugin.xml index 60e2807670eb..58deaa223aa3 100644 --- a/plugins/ide-features-trainer/res/META-INF/plugin.xml +++ b/plugins/ide-features-trainer/res/META-INF/plugin.xml @@ -70,7 +70,7 @@ @@ -99,7 +99,7 @@ - + diff --git a/plugins/ide-features-trainer/res/learnProjects/.idea/icon.png b/plugins/ide-features-trainer/res/learnProjects/.idea/icon.png deleted file mode 100644 index 369569a5749f048feba0b485b53bf32d9891f231..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 782 zcmV+p1M&QcP)DwRsAR=;1)vUQc^)hvlW}LWoKn|MF%9+!Ab*Pwai?e3{>o3sJ(*nUF1pfsA3bg%PEUIDYm6S{UxCD z@01N-L0fhxJCz2R@a=mlLpD(sy~=B%%LJAg+8GcE@+bvRg8`xP!bHE-XTQu9tPJ|P zeQzuvP^|e>PdmVVGba7}RWlP@(e)0+{AZpJoSyvY^W9nhwO5v-)`8 z0tO`p5XyT#^#m{#EPMJ|FhFnL5PqY4G$=*@qp(lDeApjbP(b+0x&M`6p$-Ug82k;R zcLRO$W;a3%pyoq3O(<@Va|5`mPc9Bn^I=?20AcUvnE`yL9V`|Q*ri+do=*+|%(>bY z4G8TLoKatUCL+W^^OvUplhxBa0;YxMD9D({XZbiA`EFSi#`KylA&!Nom3 zOl7FZIp?+66&e)xye3XC=qZ;SoYy7^*3j}E) { val previousOpenedVersion = CourseManager.instance.previousOpenedVersion StatisticBase.logNewLessonsNotification(newLessonsCount, previousOpenedVersion) val notification = iftNotificationGroup.createNotification(LearnBundle.message("notification.about.new.lessons"), NotificationType.INFORMATION) - notification.icon = FeaturesTrainerIcons.Img.FeatureTrainer + notification.icon = FeaturesTrainerIcons.FeatureTrainer notification.addAction(object : NotificationAction(LearnBundle.message("notification.show.new.lessons")) { override fun actionPerformed(e: AnActionEvent, notification: Notification) { diff --git a/plugins/ide-features-trainer/src/training/ui/IftTipAndTrickPromoter.kt b/plugins/ide-features-trainer/src/training/ui/IftTipAndTrickPromoter.kt index 1305cf22ffff..5c1b0a4ce20c 100644 --- a/plugins/ide-features-trainer/src/training/ui/IftTipAndTrickPromoter.kt +++ b/plugins/ide-features-trainer/src/training/ui/IftTipAndTrickPromoter.kt @@ -48,7 +48,7 @@ class IftTipAndTrickPromoter : TipAndTrickPromotionFactory { container.background = UISettings.getInstance().shortcutBackgroundColor val promotionLabel = JLabel(LearnBundle.message("tip.and.trick.promotion.label")) - promotionLabel.icon = FeaturesTrainerIcons.Img.FeatureTrainerBanner + promotionLabel.icon = FeaturesTrainerIcons.FeatureTrainerBanner promotionLabel.iconTextGap = JBUI.scale(6) container.add(Box.createRigidArea(JBDimension(12, 28))) container.add(promotionLabel) diff --git a/plugins/ide-features-trainer/src/training/ui/LessonMessagePane.kt b/plugins/ide-features-trainer/src/training/ui/LessonMessagePane.kt index 9dc0d7a7da63..454efbfb186f 100644 --- a/plugins/ide-features-trainer/src/training/ui/LessonMessagePane.kt +++ b/plugins/ide-features-trainer/src/training/ui/LessonMessagePane.kt @@ -263,7 +263,7 @@ internal class LessonMessagePane(private val panelMode: Boolean = true) : Styled continue } val icon = if (lessonMessage.state == MessageState.PASSED) { - FeaturesTrainerIcons.Img.GreenCheckmark + FeaturesTrainerIcons.GreenCheckmark } else if (!LessonManager.instance.lessonIsRunning()) { AllIcons.General.Information diff --git a/plugins/ide-features-trainer/src/training/ui/OnboardingFeedbackForm.kt b/plugins/ide-features-trainer/src/training/ui/OnboardingFeedbackForm.kt index e07920fe5c80..5a03bb17e250 100644 --- a/plugins/ide-features-trainer/src/training/ui/OnboardingFeedbackForm.kt +++ b/plugins/ide-features-trainer/src/training/ui/OnboardingFeedbackForm.kt @@ -307,8 +307,8 @@ private fun showSystemData(project: Project?, private fun createLikenessPanel(): Pair FeedbackLikenessAnswer> { val votePanel = NonOpaquePanel() - val likeIcon = getLikenessIcon(FeaturesTrainerIcons.Img.Like) - val dislikeIcon = getLikenessIcon(FeaturesTrainerIcons.Img.Dislike) + val likeIcon = getLikenessIcon(FeaturesTrainerIcons.Like) + val dislikeIcon = getLikenessIcon(FeaturesTrainerIcons.Dislike) votePanel.layout = BoxLayout(votePanel, BoxLayout.X_AXIS) val likeAnswer = FeedbackOption(likeIcon) votePanel.add(likeAnswer) diff --git a/plugins/ide-features-trainer/src/training/ui/views/LearningItems.kt b/plugins/ide-features-trainer/src/training/ui/views/LearningItems.kt index 1df7e736299d..b18047ccf60e 100644 --- a/plugins/ide-features-trainer/src/training/ui/views/LearningItems.kt +++ b/plugins/ide-features-trainer/src/training/ui/views/LearningItems.kt @@ -72,7 +72,7 @@ class LearningItems(private val project: Project) : JPanel() { result.layout = BoxLayout(result, BoxLayout.X_AXIS) result.alignmentX = LEFT_ALIGNMENT result.border = EmptyBorder(JBUI.scale(7), JBUI.scale(7), JBUI.scale(6), JBUI.scale(7)) - val checkmarkIconLabel = createLabelIcon(if (lesson.passed) FeaturesTrainerIcons.Img.GreenCheckmark else EmptyIcon.ICON_16) + val checkmarkIconLabel = createLabelIcon(if (lesson.passed) FeaturesTrainerIcons.GreenCheckmark else EmptyIcon.ICON_16) result.add(createLabelIcon(EmptyIcon.ICON_16)) result.add(scaledRigid(UISettings.getInstance().expandAndModuleGap, 0)) result.add(checkmarkIconLabel) diff --git a/plugins/ide-features-trainer/src/training/ui/welcomeScreen/IFTInteractiveCourse.kt b/plugins/ide-features-trainer/src/training/ui/welcomeScreen/IFTInteractiveCourse.kt index b00d3b91bc5b..3d17a79f4a42 100644 --- a/plugins/ide-features-trainer/src/training/ui/welcomeScreen/IFTInteractiveCourse.kt +++ b/plugins/ide-features-trainer/src/training/ui/welcomeScreen/IFTInteractiveCourse.kt @@ -42,7 +42,7 @@ private class IFTInteractiveCourseData : InteractiveCourseData { } override fun getIcon(): Icon { - return FeaturesTrainerIcons.Img.PluginIcon + return FeaturesTrainerIcons.PluginIcon } override fun getActionButtonName(): String { diff --git a/plugins/ide-features-trainer/src/training/ui/welcomeScreen/OnboardingLessonPromoter.kt b/plugins/ide-features-trainer/src/training/ui/welcomeScreen/OnboardingLessonPromoter.kt index caf43fae2161..fed5f40e19da 100644 --- a/plugins/ide-features-trainer/src/training/ui/welcomeScreen/OnboardingLessonPromoter.kt +++ b/plugins/ide-features-trainer/src/training/ui/welcomeScreen/OnboardingLessonPromoter.kt @@ -36,7 +36,7 @@ open class OnboardingLessonPromoter(@NonNls private val lessonId: String, @Nls private val lessonName: String, @NonNls private val languageName: String) : BannerStartPagePromoter() { override val promoImage: Icon - get() = FeaturesTrainerIcons.Img.PluginIcon + get() = FeaturesTrainerIcons.PluginIcon override fun getPromotion(isEmptyState: Boolean): JPanel? { scheduleOnboardingFeedback() diff --git a/plugins/ide-features-trainer/testSrc/training/simple/MessageFactoryTest.kt b/plugins/ide-features-trainer/testSrc/training/simple/MessageFactoryTest.kt index 05d15f72d0b2..701507bbc0ab 100644 --- a/plugins/ide-features-trainer/testSrc/training/simple/MessageFactoryTest.kt +++ b/plugins/ide-features-trainer/testSrc/training/simple/MessageFactoryTest.kt @@ -85,7 +85,7 @@ class MessageFactoryTest : BasePlatformTestCase() { } fun testIconIdx() { - val icon = FeaturesTrainerIcons.Img.PluginIcon + val icon = FeaturesTrainerIcons.PluginIcon val index = LearningUiManager.getIconIndex(icon) val parts: List = convertOneParagraph("Press $index") @@ -95,7 +95,7 @@ class MessageFactoryTest : BasePlatformTestCase() { } fun testIllustration() { - val icon = FeaturesTrainerIcons.Img.PluginIcon + val icon = FeaturesTrainerIcons.PluginIcon val index = LearningUiManager.getIconIndex(icon) val parts: List = convertOneParagraph("$index") diff --git a/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/essensial/PythonOnboardingTourLesson.kt b/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/essensial/PythonOnboardingTourLesson.kt index 8e860caba03d..49de3e4e87ad 100644 --- a/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/essensial/PythonOnboardingTourLesson.kt +++ b/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/essensial/PythonOnboardingTourLesson.kt @@ -192,7 +192,7 @@ class PythonOnboardingTourLesson : LessonUtil.returnToWelcomeScreenRemark())) .yesText(PythonLessonsBundle.message("python.onboarding.finish.exit")) .noText(PythonLessonsBundle.message("python.onboarding.finish.modules")) - .icon(FeaturesTrainerIcons.Img.PluginIcon) + .icon(FeaturesTrainerIcons.PluginIcon) .show(project) when (result) {