Skip to content

Commit

Permalink
Add introduction module
Browse files Browse the repository at this point in the history
  • Loading branch information
tiginamaria committed Jan 23, 2024
1 parent 0557b12 commit 32f0e4c
Show file tree
Hide file tree
Showing 86 changed files with 112 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ In the `.github/workflows` directory, you can find definitions for the following
[file:gradle.properties]: ./gradle.properties
[file:course-info.yaml]: ./course-info.yaml
[file:courseignore]: .courseignore
[file:course.lesson.tests]: courseSection/psi/programmingTask/test/Tests.kt
[file:course.framework.lesson.tests]: ./courseSection/courseFrameworkLesson/programmingTask/test/Tests.kt
[file:course.lesson.tests]: psiSection/psi/programmingTask/test/Tests.kt
[file:course.framework.lesson.tests]: psiSection/courseFrameworkLesson/programmingTask/test/Tests.kt

[gradle]: https://gradle.org

Expand Down
5 changes: 3 additions & 2 deletions course-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ language: English
summary: TODO
programming_language: Kotlin
content:
- courseSection
- introductionSection
- psiSection
environment_settings:
jvm_language_level: JDK_17
jvm_language_level: JDK_20

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion courseSection/section-remote-info.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions introductionSection/section-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
custom_name: Introduction
content:
- welcomeLesson
1 change: 1 addition & 0 deletions introductionSection/section-remote-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 720914665
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.jetbrains.academy.plugin.course.dev.welcome

fun sayHelloHelena(howManyTimes: Int): String {
return List(howManyTimes) { "Hello, Helena!" }.joinToString(System.lineSeparator())
}

fun main() {
val howManyTimes = readln().toInt()
print(sayHelloHelena(howManyTimes))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: edu
custom_name: Hello Helena!
files:
- name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/welcome/HelloHelena.kt
visible: true
- name: test/org/jetbrains/academy/plugin/course/dev/welcome/Tests.kt
visible: false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 963422420
10 changes: 10 additions & 0 deletions introductionSection/welcomeLesson/helloHelenaTask/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Hi! My name is Helena. I’m working in the Plugin Development Team. We have just hired a new young developer, Jonsi, so I’ve prepared lots of amazing projects for him to do.

But wait, he has never worked with IntelliJ Platform before?! So well, I’ll try to teach him all important things during one week of his probation.

Say hello to Helena! Add implementation to method `helloHelena` method which should return “Hello, Helena!” given number of times, separated by new line.

<div class="hint">

Use `System.lineSeparator()` to get platform specific new line symbol
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.jetbrains.academy.plugin.course.dev.welcome


import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized

@RunWith(Parameterized::class)
class Test(private val howManyTimes: Int) {

private fun expectedSayHelloHelena(howManyTimes: Int): String {
return List(howManyTimes) { "Hello, Helena!" }.joinToString(System.lineSeparator())
}

@Test
fun test() {
assertEquals(expectedSayHelloHelena(howManyTimes), sayHelloHelena(howManyTimes))
}

companion object {
@JvmStatic
@Parameterized.Parameters
fun data(): List<Int> {
return listOf(1, 5, 10, 100)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.jetbrains.academy.plugin.course.dev.welcome

fun sayHelloJonsi(howManyTimes: Int): String {
return List(howManyTimes) { "Hello, Jonsi!" }.joinToString(System.lineSeparator())
}

fun main() {
val howManyTimes = readln().toInt()
print(sayHelloJonsi(howManyTimes))
}
12 changes: 12 additions & 0 deletions introductionSection/welcomeLesson/helpJonsiTask/task-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: choice
is_multiple_choice: false
options:
- text: "yes"
is_correct: true
- text: "no"
is_correct: false
files:
- name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/welcome/HelloJonsi.kt
visible: true
custom_name: Ready to Help Jonsi?
local_check: true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1111659873
5 changes: 5 additions & 0 deletions introductionSection/welcomeLesson/helpJonsiTask/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Hi! My name is Jonsi! It’s my first day at JetBrains, and I’m ready to start! But I’m really nervous of my probation week as I have no idea, how IDE works behind and what is more, how to write plugins for it.

So I really need someone's help!!!

Maybe you can help me?
4 changes: 4 additions & 0 deletions introductionSection/welcomeLesson/lesson-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
custom_name: Introduction to PSI
content:
- helloHelenaTask
- helpJonsiTask
1 change: 1 addition & 0 deletions introductionSection/welcomeLesson/lesson-remote-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 272542520
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1009159624
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 936184446
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1714117250
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 157641568
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1804386534
1 change: 1 addition & 0 deletions psiSection/addingPsiElementsLesson/lesson-remote-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1728155090
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 908070682
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1566727311
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1776385370
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1629611363
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 1743622574
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 816668505
1 change: 1 addition & 0 deletions psiSection/introductionToPsiLesson/lesson-remote-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 453601871
File renamed without changes.
1 change: 1 addition & 0 deletions psiSection/section-remote-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 2041201855

0 comments on commit 32f0e4c

Please sign in to comment.