Skip to content

Commit

Permalink
[IFT] Adjust debug step in onboarding lessons to new debugger layout
Browse files Browse the repository at this point in the history
There will be only one variant of the debugger layout in the 2023.1.

GitOrigin-RevId: ee2de2446e0c297b1f1e88e90ef604ad45eaeffc
  • Loading branch information
KonstantinHudyakov authored and intellij-monorepo-bot committed Feb 13, 2023
1 parent c92d3bc commit 061813a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ java.onboarding.toggle.breakpoint.1=You may notice that instead of the expected
java.onboarding.toggle.breakpoint.2=Click the gutter within the highlighted area to set a breakpoint.
java.onboarding.balloon.start.debugging=Click the icon to start debugging
java.onboarding.start.debugging=Click the {0} icon to start the debugging process.
java.onboarding.balloon.about.debug.panel=The {0} tool window provides {1,choice,0#a toolbar|1#toolbars} with various debugging actions. \
You can take the {2} lesson later to try them.
java.onboarding.balloon.about.debug.panel=The {0} tool window provides a toolbar with various debugging actions. \
You can take the {1} lesson later to try them.
java.onboarding.balloon.stop.debugging=Click the icon to stop debugging
java.onboarding.stop.debugging=Let''s stop debugging. Click the {0} icon.
java.onboarding.type.division=Once you have discovered the problem in the code, let''s fix it. Divide the resulting sum by the length of the values. \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ class JavaOnboardingTourLesson : KLesson("java.onboarding", JavaLessonsBundle.me
gotItStep(Balloon.Position.above, width = 0,
JavaLessonsBundle.message("java.onboarding.balloon.about.debug.panel",
strong(UIBundle.message("tool.window.name.debug")),
if (UIExperiment.isNewDebuggerUIEnabled()) 0 else 1,
strong(LessonsBundle.message("debug.workflow.lesson.name"))))
restoreIfModified(sample)
}
Expand Down
14 changes: 8 additions & 6 deletions plugins/ide-features-trainer/src/training/dsl/LessonUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package training.dsl
import com.intellij.codeInsight.documentation.DocumentationComponent
import com.intellij.codeInsight.documentation.DocumentationEditorPane
import com.intellij.codeInsight.documentation.QuickDocUtil.isDocumentationV2Enabled
import com.intellij.execution.ui.UIExperiment
import com.intellij.execution.ui.layout.impl.JBRunnerTabs
import com.intellij.execution.ui.layout.impl.RunnerLayoutSettings
import com.intellij.ide.IdeBundle
import com.intellij.openapi.actionSystem.ActionManager
Expand Down Expand Up @@ -60,6 +60,7 @@ import training.learn.lesson.LessonManager
import training.ui.*
import training.ui.LearningUiUtil.findComponentWithTimeout
import training.util.getActionById
import training.util.isToStringContains
import training.util.learningToolWindow
import training.util.surroundWithNonBreakSpaces
import java.awt.*
Expand Down Expand Up @@ -414,14 +415,15 @@ fun LessonContext.highlightRunToolbar(highlightInside: Boolean = true, usePulsat

fun LessonContext.highlightDebugActionsToolbar(highlightInside: Boolean = true, usePulsation: Boolean = true) {
task {
highlightToolbarWithAction(ActionPlaces.DEBUGGER_TOOLBAR, "Resume", highlightInside, usePulsation)
// wait for the treads & variables tab to be become selected
// otherwise the incorrect toolbar can be highlighted in the next task
triggerUI().component { tabs: JBRunnerTabs ->
tabs.selectedInfo?.text.isToStringContains(XDebuggerBundle.message("xdebugger.threads.vars.tab.title"))
}
}

task {
if (!UIExperiment.isNewDebuggerUIEnabled()) {
highlightToolbarWithAction(ActionPlaces.DEBUGGER_TOOLBAR, "ShowExecutionPoint",
highlightInside, usePulsation, clearPreviousHighlights = false)
}
highlightToolbarWithAction(ActionPlaces.DEBUGGER_TOOLBAR, "Resume", highlightInside, usePulsation)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ python.onboarding.toggle.breakpoint.1=You may notice that instead of the expecte
python.onboarding.toggle.breakpoint.2=Click the gutter within the highlighted area to set a breakpoint.
python.onboarding.balloon.start.debugging=Click the icon to start debugging
python.onboarding.start.debugging=Click the {0} icon to start the debugging process.
python.onboarding.balloon.about.debug.panel=The {0} tool window provides {1,choice,0#a toolbar|1#toolbars} with various debugging actions. \
You can take the {2} lesson later to try them.
python.onboarding.balloon.about.debug.panel=The {0} tool window provides a toolbar with various debugging actions. \
You can take the {1} lesson later to try them.
python.onboarding.balloon.stop.debugging=Click the icon to stop debugging
python.onboarding.stop.debugging=Let''s stop debugging. Click the {0} icon.
python.onboarding.type.division=Once you have discovered the problem in the code, let''s fix it. Divide the resulting sum by the length of the values. \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ class PythonOnboardingTourLesson :
gotItStep(Balloon.Position.above, width = 0,
PythonLessonsBundle.message("python.onboarding.balloon.about.debug.panel",
strong(UIBundle.message("tool.window.name.debug")),
if (UIExperiment.isNewDebuggerUIEnabled()) 0 else 1,
strong(LessonsBundle.message("debug.workflow.lesson.name"))))
restoreIfModified(sample)
}
Expand Down

0 comments on commit 061813a

Please sign in to comment.