From edd2a48d8fb346f877b523442022c037c76018d1 Mon Sep 17 00:00:00 2001 From: Alexey Merkulov Date: Wed, 16 Sep 2020 17:01:17 +0300 Subject: [PATCH] [IFT] Replace Java File Structure lesson for the general variant GitOrigin-RevId: 818a361f8aa1fd299d9f73664a086bf2a4c4d328 --- .../res/data/modules/java/Navigation.xml | 2 +- .../java/Navigation/03.FileStructure.xml | 43 ---- .../LearnProject/src/FileStructureDemo.java | 227 ++++++++++++++++++ .../navigation/JavaFileStructureLesson.kt | 12 + 4 files changed, 240 insertions(+), 44 deletions(-) delete mode 100755 ide-features-trainer/res/data/modules/java/Navigation/03.FileStructure.xml create mode 100644 ide-features-trainer/res/learnProjects/java/LearnProject/src/FileStructureDemo.java create mode 100644 ide-features-trainer/src/training/learn/lesson/java/navigation/JavaFileStructureLesson.kt diff --git a/ide-features-trainer/res/data/modules/java/Navigation.xml b/ide-features-trainer/res/data/modules/java/Navigation.xml index 33cc664593..3b114a7de4 100755 --- a/ide-features-trainer/res/data/modules/java/Navigation.xml +++ b/ide-features-trainer/res/data/modules/java/Navigation.xml @@ -1,7 +1,7 @@ + - diff --git a/ide-features-trainer/res/data/modules/java/Navigation/03.FileStructure.xml b/ide-features-trainer/res/data/modules/java/Navigation/03.FileStructure.xml deleted file mode 100755 index 05e29d5c0b..0000000000 --- a/ide-features-trainer/res/data/modules/java/Navigation/03.FileStructure.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Navigation through large sources is complicated, and sometimes you need an overview of a file. Use FileStructurePopup to see the file structure. - - \ No newline at end of file diff --git a/ide-features-trainer/res/learnProjects/java/LearnProject/src/FileStructureDemo.java b/ide-features-trainer/res/learnProjects/java/LearnProject/src/FileStructureDemo.java new file mode 100644 index 0000000000..f1990ac7bf --- /dev/null +++ b/ide-features-trainer/res/learnProjects/java/LearnProject/src/FileStructureDemo.java @@ -0,0 +1,227 @@ + +public class FileStructureDemo { + public void helloWorld() { + System.out.println("Hello world!"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void welcome() { + System.out.println("JetBrains is aiming to create the best IDEs in the world!"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printHippogryph() { + System.out.println("Hippogryph! Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void hospitalInformation() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printHomeDesign() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printHomoNeanderthalensis() { + System.out.println("Homo Neanderthalensis is a parallel evolution branch of humans."); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printHomoSapiens() { + System.out.println("Homo Sapiens is a biological name of modern humans."); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printHomoErectus() { + System.out.println("Homo Erectus is most likely the ancestor of modern humans."); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void printSapphire() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + + public void phoneDescription() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void foo() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void boo() { + System.out.println("Just another method to illustrate fast file structure search :)"); + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + // A lot of code can be inside methods :) + } + + public void animal() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void parrot() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void plain() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + + public void air() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void aim() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void book() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void bank() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void boring() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void car() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void cancel() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void zoo() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void zero() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void first() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void second() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void direction() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void director() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + + public static class Internal { + public void anotherMethod1() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void anotherMethod2() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + + public void homoHistory() { + System.out.println("Just another method to illustrate fast file structure search :)"); + } + } +} diff --git a/ide-features-trainer/src/training/learn/lesson/java/navigation/JavaFileStructureLesson.kt b/ide-features-trainer/src/training/learn/lesson/java/navigation/JavaFileStructureLesson.kt new file mode 100644 index 0000000000..3433cf6ba4 --- /dev/null +++ b/ide-features-trainer/src/training/learn/lesson/java/navigation/JavaFileStructureLesson.kt @@ -0,0 +1,12 @@ +// Copyright 2000-2020 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.learn.lesson.java.navigation + +import training.learn.interfaces.Module +import training.learn.lesson.general.navigation.FileStructureLesson + +class JavaFileStructureLesson(module: Module) : FileStructureLesson(module, "JAVA") { + override val searchSubstring: String = "hosa" + override val firstWord: String = "homo" + override val secondWord: String = "sapience" + override val existedFile: String = "src/FileStructureDemo.java" +} -- 2.23.3