mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[IFT] Rewrite onboarding messages
IDEA-CR-70872 GitOrigin-RevId: 7d3de071c7a7583e7dd42532069fbe1b692512cb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f7a79f1c17
commit
0f1a15684a
@@ -1,7 +1,9 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package training.dsl
|
||||
|
||||
import com.intellij.openapi.actionSystem.*
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys
|
||||
import com.intellij.openapi.actionSystem.DataProvider
|
||||
import com.intellij.openapi.actionSystem.impl.ActionButton
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
@@ -29,7 +31,6 @@ import com.intellij.util.ui.UIUtil
|
||||
import com.intellij.xdebugger.XDebuggerManager
|
||||
import org.fest.swing.timing.Timeout
|
||||
import org.jetbrains.annotations.Nls
|
||||
import training.dsl.*
|
||||
import training.learn.LearnBundle
|
||||
import training.learn.LessonsBundle
|
||||
import training.ui.LearningUiHighlightingManager
|
||||
@@ -298,6 +299,7 @@ fun LessonContext.highlightButtonById(actionId: String): CompletableFuture<Boole
|
||||
inline fun <reified ComponentType : Component> LessonContext.highlightAllFoundUi(
|
||||
clearPreviousHighlights: Boolean = true,
|
||||
highlightInside: Boolean = true,
|
||||
usePulsation: Boolean = false,
|
||||
crossinline finderFunction: TaskRuntimeContext.(ComponentType) -> Boolean
|
||||
) {
|
||||
prepareRuntimeTask {
|
||||
@@ -310,7 +312,9 @@ inline fun <reified ComponentType : Component> LessonContext.highlightAllFoundUi
|
||||
|
||||
invokeLater {
|
||||
for (ui in result) {
|
||||
val options = LearningUiHighlightingManager.HighlightingOptions(clearPreviousHighlights = false, highlightInside = highlightInside)
|
||||
val options = LearningUiHighlightingManager.HighlightingOptions(clearPreviousHighlights = false,
|
||||
highlightInside = highlightInside,
|
||||
usePulsation = usePulsation)
|
||||
LearningUiHighlightingManager.highlightComponent(ui, options)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ internal object LessonExecutorUtil {
|
||||
balloonPanel.isOpaque = false
|
||||
balloonPanel.layout = BoxLayout(balloonPanel, BoxLayout.Y_AXIS)
|
||||
var height = preferredSize.height + 16
|
||||
val width = (if (balloonConfig.width != 0) balloonConfig.width else (preferredSize.width + 2)) + 16
|
||||
val width = (if (balloonConfig.width != 0) balloonConfig.width else (preferredSize.width + 6)) + 16
|
||||
balloonPanel.add(messagesPane)
|
||||
val gotItCallBack = balloonConfig.gotItCallBack
|
||||
val gotItButton = if (gotItCallBack != null) JButton().also {
|
||||
|
||||
@@ -67,7 +67,8 @@ abstract class CommonDebugLesson(id: String) : KLesson(id, LessonsBundle.message
|
||||
prepareTask()
|
||||
|
||||
toggleBreakpointTask(sample, { logicalPosition }) {
|
||||
LessonsBundle.message("debug.workflow.toggle.breakpoint", action("ToggleLineBreakpoint"))
|
||||
text(LessonsBundle.message("debug.workflow.toggle.breakpoint",
|
||||
action("ToggleLineBreakpoint")))
|
||||
}
|
||||
|
||||
startDebugTask()
|
||||
@@ -463,7 +464,7 @@ private val incorrectBreakPointsMessage = LessonsBundle.message("debug.workflow.
|
||||
fun LessonContext.toggleBreakpointTask(sample: LessonSample,
|
||||
logicalPosition: () -> LogicalPosition,
|
||||
checkLine: Boolean = true,
|
||||
@Nls message: TaskContext.() -> String) {
|
||||
textContent: TaskContext.() -> Unit) {
|
||||
highlightBreakpointGutter(logicalPosition)
|
||||
|
||||
prepareRuntimeTask {
|
||||
@@ -474,7 +475,7 @@ fun LessonContext.toggleBreakpointTask(sample: LessonSample,
|
||||
}
|
||||
|
||||
task {
|
||||
text(message())
|
||||
textContent()
|
||||
stateCheck {
|
||||
lineWithBreakpoints() == setOf(logicalPosition().line)
|
||||
}
|
||||
|
||||
@@ -2,40 +2,41 @@ python.onboarding.module.name=Onboarding Tour
|
||||
python.onboarding.module.description=A brief overview of the main features in {0}.
|
||||
|
||||
python.onboarding.lesson.name=Get Acquainted with PyCharm
|
||||
python.onboarding.balloon.project.view=The Project view is one of the main tool windows. Use the striped button to open it, and you will see a simple demo project. You can also open it by pressing {0}.
|
||||
python.onboarding.balloon.project.directory=The Project view contains the project directory, SDK-specific external libraries, and scratch files. Expand the project directory to proceed.
|
||||
python.onboarding.project.view.description=The <strong>Project view</strong> is one of the main tool windows. It contains the project directory, SDK-specific external libraries, and scratch files. Use the striped button to open it, and you will see a simple demo project. You can also open it by pressing {0}.
|
||||
python.onboarding.balloon.project.view=Click to open the <strong>Project view</strong>
|
||||
python.onboarding.balloon.project.directory=Expand the project directory to view the project files
|
||||
python.onboarding.balloon.open.file=Double-click to open {0}
|
||||
python.onboarding.balloon.open.learn.toolbar=Let's switch to the Learn tool window to continue this lesson
|
||||
python.onboarding.context.menu=Right-click the editor to invoke the context menu and run the demo sample.
|
||||
python.onboarding.run.sample=Choose {0} or try the {1} shortcut.
|
||||
python.onboarding.temporary.configuration.description=<ide/> has just created a temporary run configuration. You can modify it later to specify the way <ide/> executes your code.
|
||||
python.onboarding.press.got.it.to.proceed=Press {0} to proceed.
|
||||
python.onboarding.run.panel.description=You can use this toolbar to modify a run configuration, rerun it, debug your code, collect code coverage, and profile your application. You will have the opportunity to try these workflows in other lessons.
|
||||
python.onboarding.balloon.click.here=Click here
|
||||
python.onboarding.toggle.breakpoint=You may notice that the method {0} returns an incorrect value. Let''s stop at the return statement to debug it. Click the gutter in the highlighted area to set a breakpoint.
|
||||
python.onboarding.balloon.start.debugging=Let's start debugging
|
||||
python.onboarding.balloon.open.learn.toolbar=Switch to the {0} tool window to continue this lesson
|
||||
python.onboarding.context.menu=You have opened the demo, now let's run it. Right-click the editor to invoke the context menu.
|
||||
python.onboarding.run.sample=Choose {0} or try the {1}.
|
||||
python.onboarding.temporary.configuration.description=<ide/> has just created a temporary run configuration. You can find it in the Run toolbar. With this toolbar, you can execute popular running actions for the selected configuration, such as running {0}, debugging {1}, profiling code {2}, and running your code with coverage {3}.
|
||||
python.onboarding.proceed.to.the.next.step=<callback id="{0}">Click to proceed</callback>
|
||||
python.onboarding.balloon.click.here=Click here to set a breakpoint
|
||||
python.onboarding.toggle.breakpoint.1=You may notice that the method {0} returns an incorrect value. Let''s stop at the return statement to debug it.
|
||||
python.onboarding.toggle.breakpoint.2=Click the gutter in the highlighted area to set a breakpoint.
|
||||
python.onboarding.balloon.start.debugging=\u0421lick the icon to start debugging
|
||||
python.onboarding.start.debugging=Click the {0} icon to start the debugging process.
|
||||
python.onboarding.balloon.about.debug.panel=This toolbar provides various debugging actions, such as step in, step over, run to the cursor, and so on. We suggest that you take the {0} lesson later to try them!
|
||||
python.onboarding.balloon.stop.debugging=Let's stop debugging
|
||||
python.onboarding.stop.debugging=Click the {0} icon to stop debugging.
|
||||
python.onboarding.type.division=It seems that we need to divide the resulting sum by the length of the values. Type {0}.
|
||||
python.onboarding.choose.len.item=<ide/> shows completion variants automatically as you type. Select the {0} item (using the keyboard arrows) and press {1}.
|
||||
python.onboarding.invoke.completion=The caret is now inside parentheses {0}. Let''s invoke the completion list explicitly by {1}.
|
||||
python.onboarding.choose.values.item=Select the {0} item and type {1} to reduce the completion list.
|
||||
python.onboarding.invoke.intention.for.warning=The caret is now on a line with some warnings indicated by the yellow bulb. To preview the warnings and apply a quick fix, press {0}.
|
||||
python.onboarding.select.fix=Let''s apply the first item: {0}.
|
||||
python.onboarding.invoke.intention.for.code=<ide/> provides a lot of intentions that save time and make coding easier. Press {0} again to see what can be applied to {1}.
|
||||
python.onboarding.apply.intention=Let''s apply the {0} intention.
|
||||
python.onboarding.complete.template=Note that the caret has been moved to the place where the return type is specified. Type {0} and then press {1}.
|
||||
python.onboarding.invoke.search.everywhere=You may notice that we''ve selected {0}. Press {1} two times to open the {2} dialog.
|
||||
python.onboarding.search.everywhere.description=Here you can find any entity in your project or any feature in <ide/> by searching for its name! As you can see, the selected text has been automatically copied into the input string. And the only item we''ve found is the {0} function from the current file.
|
||||
python.onboarding.set.input.in.search.everywhere=Now let''s replace {0} with {1} in the input field.
|
||||
python.onboarding.apply.action=You can see the {0} action. Let''s apply the action: select the highlighted item and press {1}. Or just click it.
|
||||
python.onboarding.balloon.about.debug.panel=The {0} tool window provides toolbars 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 discovered the problem in the code, let''s fix it. Divide the resulting sum by the length of the values. Type {0}.
|
||||
python.onboarding.choose.len.item=<ide/> shows completion options automatically as you type. Select the {0} item using the keyboard arrows and press {1}.
|
||||
python.onboarding.invoke.completion=Now let''s invoke code completion to insert {0} inside parentheses {1}. Press {2} to open the completion list.
|
||||
python.onboarding.choose.values.item=You may type {0} to reduce the number of suggested items. Select {1} and press {2}.
|
||||
python.onboarding.invoke.intention.for.warning.1=You have just fixed a bug but you can make this code look even better. PyCharm highlights and adds a yellow bulb to the code lines that can be improved.
|
||||
python.onboarding.invoke.intention.for.warning.2=Press {0} to preview the warnings and apply a quick fix.
|
||||
python.onboarding.select.fix=Apply the first item: {0}. With this fix, your code looks neat.
|
||||
python.onboarding.invoke.intention.for.code=Intentions also save your time and make coding easier. Let''s use an intention to quickly add a return type for {0}. Press {1}.
|
||||
python.onboarding.apply.intention=Select {0} and press {1}.
|
||||
python.onboarding.complete.template=Type {0} and then press {1}.
|
||||
python.onboarding.invoke.search.everywhere.1=While working in <ide/> you might want to search for files in your project, symbols, classes, or even IDE actions. In this lesson, let''s search for the {0} action to make the {1} string low-case.
|
||||
python.onboarding.invoke.search.everywhere.2=Press {0} two times to open the {1} dialog.
|
||||
python.onboarding.search.everywhere.description=As you can see, the selected text, {0}, has been automatically copied into the input string. Let''s type <strong>case</strong> instead of {0}.
|
||||
python.onboarding.apply.action=Select the {0} action and press {1}.
|
||||
python.onboarding.case.changed=The case has changed.
|
||||
python.onboarding.epilog=Congratulations! You have completed the onboarding tour. At this point you can:\
|
||||
\n - <callback id="{0}">Close</callback> the learning project{1}\
|
||||
\n - <callback id="{2}">Create</callback> your own new project\
|
||||
\n - <callback id="{3}">Open</callback> an existing project\
|
||||
\n - <callback id="{4}">Continue</callback> your study
|
||||
\n - <callback id="{2}">Show</callback> more lessons
|
||||
python.onboarding.return.to.welcome=\ and return to the welcome screen
|
||||
|
||||
python.f.string.completion.lesson.name=F-string completion
|
||||
|
||||
@@ -38,6 +38,7 @@ import training.dsl.*
|
||||
import training.dsl.LessonUtil.checkExpectedStateOfEditor
|
||||
import training.dsl.LessonUtil.restoreIfModified
|
||||
import training.dsl.LessonUtil.restoreIfModifiedOrMoved
|
||||
import training.learn.LearnBundle
|
||||
import training.learn.LessonsBundle
|
||||
import training.learn.course.KLesson
|
||||
import training.learn.course.LessonProperties
|
||||
@@ -47,6 +48,7 @@ import training.ui.LearningUiManager
|
||||
import training.util.invokeActionForFocusContext
|
||||
import java.awt.Component
|
||||
import java.awt.event.KeyEvent
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.JTree
|
||||
import javax.swing.tree.TreePath
|
||||
@@ -111,13 +113,11 @@ class PythonOnboardingTour :
|
||||
text(PythonLessonsBundle.message("python.onboarding.epilog",
|
||||
getCallBackActionId("CloseProject"),
|
||||
welcomeScreenRemark,
|
||||
getCallBackActionId("NewDirectoryProject"),
|
||||
getCallBackActionId("OpenFile"),
|
||||
LearningUiManager.addCallback { LearningUiManager.resetModulesView() }))
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCallBackActionId(actionId: String): Int {
|
||||
private fun getCallBackActionId(@Suppress("SameParameterValue") actionId: String): Int {
|
||||
val action = ActionManager.getInstance().getAction(actionId) ?: error("No action with Id $actionId")
|
||||
return LearningUiManager.addCallback { invokeActionForFocusContext(action) }
|
||||
}
|
||||
@@ -132,7 +132,8 @@ class PythonOnboardingTour :
|
||||
toggleBreakpointTask(sample, { logicalPosition }, checkLine = false) {
|
||||
text(PythonLessonsBundle.message("python.onboarding.balloon.click.here"),
|
||||
LearningBalloonConfig(Balloon.Position.below, width = 0, duplicateMessage = false))
|
||||
PythonLessonsBundle.message("python.onboarding.toggle.breakpoint", code("find_average"))
|
||||
text(PythonLessonsBundle.message("python.onboarding.toggle.breakpoint.1", code("find_average")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.toggle.breakpoint.2"))
|
||||
}
|
||||
|
||||
highlightButtonByIdTask("Debug")
|
||||
@@ -153,21 +154,21 @@ class PythonOnboardingTour :
|
||||
|
||||
task {
|
||||
val needFirstAction = ActionManager.getInstance().getAction("ShowExecutionPoint")
|
||||
triggerByUiComponentAndHighlight(highlightInside = false) { ui: ActionToolbarImpl ->
|
||||
triggerByUiComponentAndHighlight(highlightInside = true, usePulsation = true) { ui: ActionToolbarImpl ->
|
||||
ui.size.let { it.width > 0 && it.height > 0 } && ui.place == "DebuggerToolbar" && checkFirstButton(ui, needFirstAction)
|
||||
}
|
||||
}
|
||||
|
||||
highlightAllFoundUi(clearPreviousHighlights = false, highlightInside = false) { ui: ActionToolbarImpl ->
|
||||
highlightAllFoundUi(clearPreviousHighlights = false, highlightInside = true, usePulsation = true) { ui: ActionToolbarImpl ->
|
||||
ui.size.let { it.width > 0 && it.height > 0 } && ui.place == "DebuggerToolbar" &&
|
||||
checkFirstButton(ui, ActionManager.getInstance().getAction("Rerun"))
|
||||
}
|
||||
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.press.got.it.to.proceed", strong(UIBundle.message("got.it"))))
|
||||
gotItStep(Balloon.Position.above, 500,
|
||||
PythonLessonsBundle.message("python.onboarding.balloon.about.debug.panel",
|
||||
strong(LessonsBundle.message("debug.workflow.lesson.name"))))
|
||||
text(PythonLessonsBundle.message("python.onboarding.balloon.about.debug.panel",
|
||||
strong(UIBundle.message("tool.window.name.debug")),
|
||||
strong(LessonsBundle.message("debug.workflow.lesson.name"))))
|
||||
proceedLink()
|
||||
restoreIfModified(sample)
|
||||
}
|
||||
|
||||
@@ -230,20 +231,28 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
task {
|
||||
triggerByUiComponentAndHighlight(highlightInside = false) { ui: ActionToolbarImpl ->
|
||||
triggerByUiComponentAndHighlight(highlightInside = true, usePulsation = true) { ui: ActionToolbarImpl ->
|
||||
ui.place == "NavBarToolbar" || ui.place == "MainToolbar"
|
||||
}
|
||||
}
|
||||
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.temporary.configuration.description"))
|
||||
|
||||
text(PythonLessonsBundle.message("python.onboarding.press.got.it.to.proceed", strong(UIBundle.message("got.it"))))
|
||||
gotItStep(Balloon.Position.below, 400, PythonLessonsBundle.message("python.onboarding.run.panel.description"))
|
||||
text(PythonLessonsBundle.message("python.onboarding.temporary.configuration.description",
|
||||
icon(AllIcons.Actions.Execute),
|
||||
icon(AllIcons.Actions.StartDebugger),
|
||||
icon(AllIcons.Actions.Profile),
|
||||
icon(AllIcons.General.RunWithCoverage)))
|
||||
proceedLink()
|
||||
restoreIfModified(sample)
|
||||
}
|
||||
}
|
||||
|
||||
private fun TaskContext.proceedLink() {
|
||||
val gotIt = CompletableFuture<Boolean>()
|
||||
text(PythonLessonsBundle.message("python.onboarding.proceed.to.the.next.step", LearningUiManager.addCallback { gotIt.complete(true) }))
|
||||
addStep(gotIt)
|
||||
}
|
||||
|
||||
private fun LessonContext.openLearnToolwindow() {
|
||||
task {
|
||||
triggerByUiComponentAndHighlight(usePulsation = true) { stripe: StripeButton ->
|
||||
@@ -252,7 +261,8 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.balloon.open.learn.toolbar"),
|
||||
text(
|
||||
PythonLessonsBundle.message("python.onboarding.balloon.open.learn.toolbar", strong(LearnBundle.message("toolwindow.stripe.Learn"))),
|
||||
LearningBalloonConfig(Balloon.Position.atRight, width = 300))
|
||||
stateCheck {
|
||||
ToolWindowManager.getInstance(project).getToolWindow("Learn")?.isVisible == true
|
||||
@@ -278,8 +288,10 @@ class PythonOnboardingTour :
|
||||
task {
|
||||
var collapsed = false
|
||||
|
||||
text(PythonLessonsBundle.message("python.onboarding.balloon.project.view", action("ActivateProjectToolWindow")),
|
||||
LearningBalloonConfig(Balloon.Position.atRight, width = 300))
|
||||
text(PythonLessonsBundle.message("python.onboarding.project.view.description",
|
||||
action("ActivateProjectToolWindow")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.balloon.project.view"),
|
||||
LearningBalloonConfig(Balloon.Position.atRight, width = 0))
|
||||
triggerByFoundPathAndHighlight { tree: JTree, path: TreePath ->
|
||||
val result = path.pathCount >= 1 && path.getPathComponent(0).toString().contains("PyCharmLearningProject")
|
||||
if (result) {
|
||||
@@ -336,7 +348,8 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
task("EditorChooseLookupItem") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.choose.len.item", code("len(__obj)"), LessonUtil.rawEnter()))
|
||||
text(PythonLessonsBundle.message("python.onboarding.choose.len.item",
|
||||
code("len(__obj)"), LessonUtil.rawEnter()))
|
||||
trigger(it) {
|
||||
checkEditorModification(completionPosition, "/len()")
|
||||
}
|
||||
@@ -344,7 +357,10 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
task("CodeCompletion") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.completion", code("()"), action(it)))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.completion",
|
||||
code("values"),
|
||||
code("()"),
|
||||
action(it)))
|
||||
trigger(it)
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { item ->
|
||||
item.toString().contains("values")
|
||||
@@ -354,7 +370,7 @@ class PythonOnboardingTour :
|
||||
|
||||
task("EditorChooseLookupItem") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.choose.values.item",
|
||||
code("values"), strong("val")))
|
||||
strong("val"), code("values"), LessonUtil.rawEnter()))
|
||||
trigger(it) {
|
||||
checkEditorModification(completionPosition, "/len(values)")
|
||||
}
|
||||
@@ -384,7 +400,8 @@ class PythonOnboardingTour :
|
||||
val reformatMessage = PyBundle.message("QFIX.reformat.file")
|
||||
caret(",6")
|
||||
task("ShowIntentionActions") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.intention.for.warning", action(it)))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.intention.for.warning.1"))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.intention.for.warning.2", action(it)))
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { item ->
|
||||
item.toString().contains(reformatMessage)
|
||||
}
|
||||
@@ -403,7 +420,8 @@ class PythonOnboardingTour :
|
||||
val returnTypeMessage = PyPsiBundle.message("INTN.specify.return.type.in.annotation")
|
||||
caret("find_average")
|
||||
task("ShowIntentionActions") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.intention.for.code", action(it), code("find_average")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.intention.for.code",
|
||||
code("find_average"), action(it)))
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { item ->
|
||||
item.toString().contains(returnTypeMessage)
|
||||
}
|
||||
@@ -411,7 +429,7 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.apply.intention", strong(returnTypeMessage)))
|
||||
text(PythonLessonsBundle.message("python.onboarding.apply.intention", strong(returnTypeMessage), LessonUtil.rawEnter()))
|
||||
stateCheck {
|
||||
// TODO: make normal check
|
||||
previous.sample.text != editor.document.text
|
||||
@@ -441,18 +459,19 @@ class PythonOnboardingTour :
|
||||
}
|
||||
|
||||
private fun LessonContext.searchEverywhereTasks() {
|
||||
val toggleCase = ActionsBundle.message("action.EditorToggleCase.text")
|
||||
caret("AVERAGE", select = true)
|
||||
task("SearchEverywhere") {
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.search.everywhere",
|
||||
code("AVERAGE"), LessonUtil.rawKeyStroke(KeyEvent.VK_SHIFT), LessonUtil.actionName(it)))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.search.everywhere.1",
|
||||
strong(toggleCase), code("AVERAGE")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.search.everywhere.2",
|
||||
LessonUtil.rawKeyStroke(KeyEvent.VK_SHIFT), LessonUtil.actionName(it)))
|
||||
trigger(it)
|
||||
restoreIfModifiedOrMoved()
|
||||
}
|
||||
|
||||
val toggleCase = ActionsBundle.message("action.EditorToggleCase.text")
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.search.everywhere.description", code("find_average")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.set.input.in.search.everywhere", strong("AVERAGE"), strong("case")))
|
||||
text(PythonLessonsBundle.message("python.onboarding.search.everywhere.description", strong("AVERAGE")))
|
||||
triggerByListItemAndHighlight { item ->
|
||||
(item as? GotoActionModel.MatchedValue)?.value?.let { GotoActionItemProvider.getActionText(it) } == toggleCase
|
||||
}
|
||||
@@ -466,6 +485,8 @@ class PythonOnboardingTour :
|
||||
restoreByUi(delayMillis = defaultRestoreDelay)
|
||||
PythonLessonsBundle.message("python.onboarding.apply.action", strong(toggleCase), LessonUtil.rawEnter())
|
||||
}
|
||||
|
||||
text(PythonLessonsBundle.message("python.onboarding.case.changed"))
|
||||
}
|
||||
|
||||
private fun TaskRuntimeContext.runManager() = RunManager.getInstance(project)
|
||||
|
||||
Reference in New Issue
Block a user