diff --git a/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties b/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties index f16df28d146b..bc40453a42c4 100644 --- a/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties +++ b/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties @@ -14,7 +14,6 @@ java.run.configuration.lets.run=Any code marked with {0} can be run. Let''s run java.postfix.completion.type=Type {0} after the parenthesis to see the list of postfix completion suggestions. java.postfix.completion.complete=Select {0} from the list or type the same value in the editor. Press {1} to complete the statement. -java.smart.type.completion.lesson.name=Smart type completion java.smart.type.completion.apply=Smart Type Completion filters the list of suggestions to include only the types applicable \ within the current context. Press {0} to see the list of matching suggestions. Choose the first one by pressing {1}. java.smart.type.completion.return=Smart Type Completion can also suggest code for a return statement. \ diff --git a/java/java-features-trainer/src/com/intellij/java/ift/lesson/completion/JavaSmartTypeCompletionLesson.kt b/java/java-features-trainer/src/com/intellij/java/ift/lesson/completion/JavaSmartTypeCompletionLesson.kt index 55809cd1a4bf..d1a86c5c1b6c 100644 --- a/java/java-features-trainer/src/com/intellij/java/ift/lesson/completion/JavaSmartTypeCompletionLesson.kt +++ b/java/java-features-trainer/src/com/intellij/java/ift/lesson/completion/JavaSmartTypeCompletionLesson.kt @@ -6,9 +6,10 @@ import training.dsl.LessonContext import training.dsl.LessonUtil.restoreIfModifiedOrMoved import training.dsl.TaskTestContext import training.dsl.parseLessonSample +import training.learn.LessonsBundle import training.learn.course.KLesson -class JavaSmartTypeCompletionLesson : KLesson("Smart type completion", JavaLessonsBundle.message("java.smart.type.completion.lesson.name")) { +class JavaSmartTypeCompletionLesson : KLesson("Smart type completion", LessonsBundle.message("smart.completion.lesson.name")) { override val testScriptProperties = TaskTestContext.TestScriptProperties(skipTesting = true) diff --git a/plugins/ide-features-trainer/res/messages/LessonsBundle.properties b/plugins/ide-features-trainer/res/messages/LessonsBundle.properties index b5361d1073a9..e55397082257 100644 --- a/plugins/ide-features-trainer/res/messages/LessonsBundle.properties +++ b/plugins/ide-features-trainer/res/messages/LessonsBundle.properties @@ -138,6 +138,8 @@ completion.with.tab.begin.completion=Press {0} to show the completion suggestion completion.with.tab.finish.with.tab=Select {0} and press {1}. \ This action does not simply inserts the selected suggestion but replaces the word at the caret completely. +smart.completion.lesson.name=Type-matching completion + postfix.completion.lesson.name=Postfix completion postfix.completion.intro=Postfix Completion helps you reduce backward caret jumps as you write code. \ It lets you transform an already typed expression into another one based on the postfix you add, the type of expression, and its context. diff --git a/python/python-features-trainer/resources/messages/PythonLessonsBundle.properties b/python/python-features-trainer/resources/messages/PythonLessonsBundle.properties index 564ce6ab8c9c..a8413e9cb2e8 100644 --- a/python/python-features-trainer/resources/messages/PythonLessonsBundle.properties +++ b/python/python-features-trainer/resources/messages/PythonLessonsBundle.properties @@ -58,7 +58,6 @@ python.f.string.completion.result.message=You may see that a simple Python strin python.postfix.completion.type=Type {0} after the parenthesis to see the list of suggestions. python.postfix.completion.complete=Select {0} from the list and press {1} to complete the statement. -python.smart.completion.lesson.name=Smart completion python.smart.completion.try.basic.completion=Try using Basic Completion by pressing {0}. python.smart.completion.use.smart.completion=Unfortunately, has no direct information on the {0} type. \ But sometimes, it can suggest completion by the context! Use {1} to invoke Smart Completion. diff --git a/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/completion/PythonSmartCompletionLesson.kt b/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/completion/PythonSmartCompletionLesson.kt index 8f5c90ac926d..15bfa20e787f 100644 --- a/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/completion/PythonSmartCompletionLesson.kt +++ b/python/python-features-trainer/src/com/jetbrains/python/ift/lesson/completion/PythonSmartCompletionLesson.kt @@ -7,14 +7,15 @@ import training.dsl.LessonUtil import training.dsl.LessonUtil.checkExpectedStateOfEditor import training.dsl.TaskContext import training.dsl.parseLessonSample +import training.learn.LessonsBundle import training.learn.course.KLesson class PythonSmartCompletionLesson - : KLesson("Smart completion", PythonLessonsBundle.message("python.smart.completion.lesson.name")) { + : KLesson("Smart completion", LessonsBundle.message("smart.completion.lesson.name")) { private val sample = parseLessonSample(""" def f(x, file): - x.append(file) - x.rem + x.append(file) + x.rem """.trimIndent()) override val lessonContent: LessonContext.() -> Unit