mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
IFT-219 Remove explicit invoke completion step
GitOrigin-RevId: 0e68537ba48f938c67f5fb56954791a87dcc7903
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cefe3d90e0
commit
def6bcf483
@@ -21,16 +21,18 @@ python.onboarding.balloon.click.here=Click here to set a breakpoint
|
||||
python.onboarding.toggle.breakpoint.1=You may notice that instead of the expected value of {0}, the {1} method returns {2}. \
|
||||
Let's stop at the return statement to debug the problematic code.
|
||||
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.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 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.type.division=Once you discovered the problem in the code, let''s fix it. Divide the resulting sum by the length of the values. \
|
||||
<ide/> shows completion options automatically as you type. Type {0}.
|
||||
python.onboarding.choose.len.item=Select the {0} item using the keyboard arrows and press {1}.
|
||||
python.onboarding.invoke.completion=Now let''s start typing {0} inside parentheses {1}.
|
||||
python.onboarding.choose.values.item=Select {0} and press {1}.
|
||||
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}.
|
||||
|
||||
@@ -131,6 +131,8 @@ class PythonOnboardingTour :
|
||||
|
||||
completionSteps()
|
||||
|
||||
waitBeforeContinue(500)
|
||||
|
||||
contextActions()
|
||||
|
||||
waitBeforeContinue(500)
|
||||
@@ -409,13 +411,7 @@ class PythonOnboardingTour :
|
||||
}
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.type.division", code(" / l")))
|
||||
var wasEmpty = false
|
||||
proposeRestore {
|
||||
checkExpectedStateOfEditor(previous.sample) {
|
||||
if (it.isEmpty()) wasEmpty = true
|
||||
wasEmpty && "/len".contains(it.replace(" ", ""))
|
||||
}
|
||||
}
|
||||
proposeRestoreForInvalidText("/len")
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { // no highlighting
|
||||
it.toString().contains("string=len;")
|
||||
}
|
||||
@@ -430,32 +426,33 @@ class PythonOnboardingTour :
|
||||
restoreByUi()
|
||||
}
|
||||
|
||||
lateinit var completionTask: TaskContext.TaskId
|
||||
task("CodeCompletion") {
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.invoke.completion",
|
||||
code("values"),
|
||||
code("()"),
|
||||
action(it)))
|
||||
trigger(it)
|
||||
restoreIfModifiedOrMoved()
|
||||
completionTask = taskId
|
||||
}
|
||||
|
||||
task {
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { item ->
|
||||
item.toString().contains("values")
|
||||
code("()")))
|
||||
triggerByListItemAndHighlight(highlightBorder = true, highlightInside = false) { // no highlighting
|
||||
it.toString().contains("values")
|
||||
}
|
||||
restoreIfModifiedOrMoved()
|
||||
restoreByTimer() // completion may be invoked in the another place, for example...
|
||||
proposeRestoreForInvalidText("values")
|
||||
}
|
||||
|
||||
task {
|
||||
text(PythonLessonsBundle.message("python.onboarding.choose.values.item",
|
||||
strong("val"), code("values"), action("EditorChooseLookupItem")))
|
||||
code("values"), action("EditorChooseLookupItem")))
|
||||
stateCheck {
|
||||
checkEditorModification(completionPosition, "/len(values)")
|
||||
}
|
||||
restoreByUi(restoreId = completionTask)
|
||||
restoreByUi()
|
||||
}
|
||||
}
|
||||
|
||||
private fun TaskContext.proposeRestoreForInvalidText(needToType: String) {
|
||||
var wasEmpty = false
|
||||
proposeRestore {
|
||||
checkExpectedStateOfEditor(previous.sample) {
|
||||
if (it.isEmpty()) wasEmpty = true
|
||||
wasEmpty && needToType.contains(it.replace(" ", ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user