[IFT] Add utility method to close find tabs
[idea/contrib.git] / ide-features-trainer / src / training / learn / lesson / general / navigation / DeclarationAndUsagesLesson.kt
index c2511e0294a90239501b0ec8cda2fcd610b08d35..0b50e239f98bd4688266b2f9a6aa9c859028ff85 100644 (file)
@@ -18,6 +18,7 @@ import training.learn.LessonsBundle
 import training.learn.interfaces.Module
 import training.learn.lesson.kimpl.KLesson
 import training.learn.lesson.kimpl.LessonContext
+import training.learn.lesson.kimpl.closeAllFindTabs
 
 abstract class DeclarationAndUsagesLesson(module: Module, lang: String)
   : KLesson("Declaration and usages", LessonsBundle.message("declaration.and.usages.lesson.name"), module, lang) {
@@ -59,6 +60,9 @@ abstract class DeclarationAndUsagesLesson(module: Module, lang: String)
       }
 
       task("FindUsages") {
+        before {
+          closeAllFindTabs()
+        }
         text(LessonsBundle.message("declaration.and.usages.find.usages", action(it)))
 
         triggerByUiComponentAndHighlight { ui: BaseLabel ->