IFT-248 Remove Structure tool window step from File structure lesson for PyCharm Edu

The structure tool window is disabled in the PyCharm Edu.

IJ-CR-11725

GitOrigin-RevId: 0bad3b5b52c784d185fb8682b6768a77eebed2ad
This commit is contained in:
Konstantin Hudyakov
2021-07-12 18:31:54 +00:00
committed by intellij-monorepo-bot
parent 591b3e56a2
commit 00ac31059d
@@ -2,6 +2,7 @@
package training.learn.lesson.general.navigation
import com.intellij.ide.dnd.aware.DnDAwareTree
import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.editor.LogicalPosition
import com.intellij.openapi.editor.impl.EditorComponentImpl
import com.intellij.ui.speedSearch.SpeedSearchSupply
@@ -48,10 +49,13 @@ abstract class FileStructureLesson
restoreState { !checkWordInSearch(searchSubstring) }
test { invokeActionViaShortcut("ENTER") }
}
task("ActivateStructureToolWindow") {
text(LessonsBundle.message("file.structure.toolwindow", action(it)))
stateCheck { focusOwner?.javaClass?.name?.contains("StructureViewComponent") ?: false }
test { actions(it) }
// There is no Structure tool window in the PyCharm Edu. So added this check.
if (ActionManager.getInstance().getAction("ActivateStructureToolWindow") != null) {
task("ActivateStructureToolWindow") {
text(LessonsBundle.message("file.structure.toolwindow", action(it)))
stateCheck { focusOwner?.javaClass?.name?.contains("StructureViewComponent") ?: false }
test { actions(it) }
}
}
}