mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
[IFT] Add sdk configuration tasks to lessons
Also specify original sample objects for restores in the first meaningful task of the lesson. It is required for the case when user change the sample during SDK configuration tasks. IJ-CR-23618 GitOrigin-RevId: cbe08c75fc89c43b3fe966e87b3feeb3a0dce9af
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5aa970d397
commit
eb44558322
@@ -46,7 +46,7 @@ class JavaSmartTypeCompletionLesson : KLesson("Smart type completion", LessonsBu
|
||||
val text = editor.document.text
|
||||
text.contains("strings = arrayBlockingQueue;") || text.contains("strings = linkedList;")
|
||||
}
|
||||
restoreIfModifiedOrMoved()
|
||||
restoreIfModifiedOrMoved(sample)
|
||||
testSmartCompletion()
|
||||
}
|
||||
caret(20, 16)
|
||||
|
||||
@@ -37,7 +37,7 @@ class JavaStatementCompletionLesson
|
||||
override val lessonContent: LessonContext.() -> Unit = {
|
||||
prepareSample(sample)
|
||||
actionTask("EditorCompleteStatement") {
|
||||
restoreIfModifiedOrMoved()
|
||||
restoreIfModifiedOrMoved(sample)
|
||||
JavaLessonsBundle.message("java.statement.completion.complete.for", action(it), code("for"))
|
||||
}
|
||||
task("EditorCompleteStatement") {
|
||||
|
||||
@@ -21,6 +21,8 @@ class JavaInheritanceHierarchyLesson
|
||||
override val sampleFilePath: String = "src/InheritanceHierarchySample.java"
|
||||
|
||||
override val lessonContent: LessonContext.() -> Unit = {
|
||||
sdkConfigurationTasks()
|
||||
|
||||
caret("foo(demo)")
|
||||
|
||||
actionTask("GotoImplementation") {
|
||||
|
||||
@@ -62,7 +62,7 @@ class JavaOccurrencesLesson
|
||||
task("Find") {
|
||||
text(JavaLessonsBundle.message("java.find.occurrences.invoke.find", code("cellphone"), action(it)))
|
||||
triggerUI().component { _: SearchTextArea -> true }
|
||||
restoreIfModifiedOrMoved()
|
||||
restoreIfModifiedOrMoved(sample)
|
||||
test { actions(it) }
|
||||
}
|
||||
task("FindNext") {
|
||||
|
||||
@@ -20,7 +20,7 @@ class JavaExtractMethodCocktailSortLesson
|
||||
showWarningIfInplaceRefactoringsDisabled()
|
||||
|
||||
actionTask("ExtractMethod") {
|
||||
restoreIfModifiedOrMoved()
|
||||
restoreIfModifiedOrMoved(javaSortSample)
|
||||
LessonsBundle.message("extract.method.invoke.action", action(it))
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import training.util.adaptToNotNativeLocalization
|
||||
import javax.swing.JDialog
|
||||
|
||||
class JavaRefactoringMenuLesson : RefactoringMenuLessonBase("java.refactoring.menu") {
|
||||
private val sample = parseLessonSample("""
|
||||
override val sample = parseLessonSample("""
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
@@ -44,8 +44,6 @@ class JavaRefactoringMenuLesson : RefactoringMenuLessonBase("java.refactoring.me
|
||||
""".trimIndent())
|
||||
|
||||
override val lessonContent: LessonContext.() -> Unit = {
|
||||
prepareSample(sample)
|
||||
showWarningIfInplaceRefactoringsDisabled()
|
||||
extractParameterTasks()
|
||||
moreRefactoringsTasks()
|
||||
restoreRefactoringOptionsInformer()
|
||||
|
||||
Reference in New Issue
Block a user