diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt b/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt deleted file mode 100644 index d85a96f..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt +++ /dev/null @@ -1,57 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import com.intellij.openapi.project.Project -import com.intellij.psi.JavaPsiFacade -import com.intellij.psi.PsiFile -import com.intellij.psi.PsiMethod -import com.intellij.psi.PsiType -import com.intellij.psi.util.PsiTreeUtil -import com.intellij.psi.util.TypeConversionUtil - -private fun addOverrideAnnotation(psiMethod: PsiMethod, project: Project) { - TODO("Not implemented yet") -} - -fun addAnnotations(psiFile: PsiFile){ - val project = psiFile.project - WriteCommandAction.runWriteCommandAction(project) { - val psiMethods = PsiTreeUtil.findChildrenOfType(psiFile, PsiMethod::class.java) - - for (psiMethod in psiMethods) { - if (shouldAddOverrideAnnotation(psiMethod)) { - addOverrideAnnotation(psiMethod, project) - } - } - } -} - -private fun shouldAddOverrideAnnotation(psiMethod: PsiMethod): Boolean { - // Logic to determine if this method overrides a method from its superclass - val containingClass = psiMethod.containingClass ?: return false - - val superClasses = containingClass.supers - val methodName = psiMethod.name - val parameterTypes = psiMethod.parameterList.parameters.map { it.type } - - for (superClass in superClasses) { - val superMethods = superClass.methods - for (superMethod in superMethods) { - if (superMethod.name == methodName - && superMethod.parameterList.parameters.map { it.type } == parameterTypes - && isReturnTypeCompatible( - superMethod.returnType, - psiMethod.returnType - ) - ) { - return true - } - } - } - return false -} - -private fun isReturnTypeCompatible(superReturnType: PsiType?, subReturnType: PsiType?): Boolean { - if (superReturnType == null || subReturnType == null) return false - return TypeConversionUtil.isAssignable(superReturnType, subReturnType) -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt b/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt deleted file mode 100644 index 37d7d32..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import org.jetbrains.kotlin.psi.KtNamedFunction - -fun editFunctionName(function: KtNamedFunction, newName: String) { - TODO("Not implemented yet") -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt b/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt deleted file mode 100644 index 384504e..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import org.jetbrains.kotlin.psi.KtClass - -fun sortMethods(ktClass: KtClass) { - TODO("Not implemented yet") -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-info.yaml deleted file mode 100644 index c75b3da..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-info.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: theory -custom_name: How to Access PSI Elements -files: - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt - visible: true diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-remote-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-remote-info.yaml deleted file mode 100644 index d72029c..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementesTheory/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 1709780301 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-info.yaml deleted file mode 100644 index 943a35c..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-info.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: edu -custom_name: Psi Manipulation Advanced -files: - - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt - visible: false - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt - visible: true diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-remote-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-remote-info.yaml deleted file mode 100644 index 0f73982..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 1002189071 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt deleted file mode 100644 index 32c6126..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt +++ /dev/null @@ -1,54 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import com.intellij.openapi.project.Project -import com.intellij.psi.JavaPsiFacade -import com.intellij.psi.PsiFile -import com.intellij.psi.PsiMethod -import com.intellij.psi.PsiType -import com.intellij.psi.util.PsiTreeUtil -import com.intellij.psi.util.TypeConversionUtil - -private fun addOverrideAnnotation(psiMethod: PsiMethod, project: Project) { - TODO("Not implemented yet") -} - -fun addAnnotations(psiFile: PsiFile){ - val project = psiFile.project - WriteCommandAction.runWriteCommandAction(project) { - val psiMethods = PsiTreeUtil.findChildrenOfType(psiFile, PsiMethod::class.java) - - for (psiMethod in psiMethods) { - if (shouldAddOverrideAnnotation(psiMethod)) { - addOverrideAnnotation(psiMethod, project) - } - } - } -} - -private fun shouldAddOverrideAnnotation(psiMethod: PsiMethod): Boolean { - // Logic to determine if this method overrides a method from its superclass - val containingClass = psiMethod.containingClass ?: return false - - val superClasses = containingClass.supers - val methodName = psiMethod.name - val parameterTypes = psiMethod.parameterList.parameters.map { it.type } - - for (superClass in superClasses) { - val superMethods = superClass.methods - for (superMethod in superMethods) { - if (superMethod.name == methodName - && superMethod.parameterList.parameters.map { it.type } == parameterTypes - && isReturnTypeCompatible(superMethod.returnType, psiMethod.returnType) - ) { - return true - } - } - } - return false -} - -private fun isReturnTypeCompatible(superReturnType: PsiType?, subReturnType: PsiType?): Boolean { - if (superReturnType == null || subReturnType == null) return false - return TypeConversionUtil.isAssignable(superReturnType, subReturnType) -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt deleted file mode 100644 index 1645688..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.psi.PsiFile -import com.intellij.psi.util.PsiTreeUtil -import org.jetbrains.kotlin.psi.KtClass - -fun countKtClasses(psiFile: PsiFile) = - PsiTreeUtil.findChildrenOfType(psiFile, KtClass::class.java).toList().size diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt deleted file mode 100644 index 37d7d32..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import org.jetbrains.kotlin.psi.KtNamedFunction - -fun editFunctionName(function: KtNamedFunction, newName: String) { - TODO("Not implemented yet") -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt deleted file mode 100644 index 384504e..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import org.jetbrains.kotlin.psi.KtClass - -fun sortMethods(ktClass: KtClass) { - TODO("Not implemented yet") -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-info.yaml deleted file mode 100644 index c766c55..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-info.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: edu -custom_name: Count number of classes -files: - - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt - visible: false - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt - visible: true diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-remote-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-remote-info.yaml deleted file mode 100644 index 608d528..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 1102308378 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt deleted file mode 100644 index 32c6126..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt +++ /dev/null @@ -1,54 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import com.intellij.openapi.project.Project -import com.intellij.psi.JavaPsiFacade -import com.intellij.psi.PsiFile -import com.intellij.psi.PsiMethod -import com.intellij.psi.PsiType -import com.intellij.psi.util.PsiTreeUtil -import com.intellij.psi.util.TypeConversionUtil - -private fun addOverrideAnnotation(psiMethod: PsiMethod, project: Project) { - TODO("Not implemented yet") -} - -fun addAnnotations(psiFile: PsiFile){ - val project = psiFile.project - WriteCommandAction.runWriteCommandAction(project) { - val psiMethods = PsiTreeUtil.findChildrenOfType(psiFile, PsiMethod::class.java) - - for (psiMethod in psiMethods) { - if (shouldAddOverrideAnnotation(psiMethod)) { - addOverrideAnnotation(psiMethod, project) - } - } - } -} - -private fun shouldAddOverrideAnnotation(psiMethod: PsiMethod): Boolean { - // Logic to determine if this method overrides a method from its superclass - val containingClass = psiMethod.containingClass ?: return false - - val superClasses = containingClass.supers - val methodName = psiMethod.name - val parameterTypes = psiMethod.parameterList.parameters.map { it.type } - - for (superClass in superClasses) { - val superMethods = superClass.methods - for (superMethod in superMethods) { - if (superMethod.name == methodName - && superMethod.parameterList.parameters.map { it.type } == parameterTypes - && isReturnTypeCompatible(superMethod.returnType, psiMethod.returnType) - ) { - return true - } - } - } - return false -} - -private fun isReturnTypeCompatible(superReturnType: PsiType?, subReturnType: PsiType?): Boolean { - if (superReturnType == null || subReturnType == null) return false - return TypeConversionUtil.isAssignable(superReturnType, subReturnType) -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt deleted file mode 100644 index 1645688..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.psi.PsiFile -import com.intellij.psi.util.PsiTreeUtil -import org.jetbrains.kotlin.psi.KtClass - -fun countKtClasses(psiFile: PsiFile) = - PsiTreeUtil.findChildrenOfType(psiFile, KtClass::class.java).toList().size diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt deleted file mode 100644 index c4c0d97..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import org.jetbrains.kotlin.psi.KtNamedFunction - -fun editFunctionName(function: KtNamedFunction, newName: String) { - val project = function.project - - WriteCommandAction.runWriteCommandAction(project) { - function.setName(newName) - } -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt deleted file mode 100644 index 384504e..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import org.jetbrains.kotlin.psi.KtClass - -fun sortMethods(ktClass: KtClass) { - TODO("Not implemented yet") -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-info.yaml deleted file mode 100644 index ca65ecd..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-info.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: edu -custom_name: Rename function using PSI -files: - - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt - visible: false - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt - visible: true diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-remote-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-remote-info.yaml deleted file mode 100644 index 7f7d9c5..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 415311235 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt deleted file mode 100644 index 32c6126..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt +++ /dev/null @@ -1,54 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import com.intellij.openapi.project.Project -import com.intellij.psi.JavaPsiFacade -import com.intellij.psi.PsiFile -import com.intellij.psi.PsiMethod -import com.intellij.psi.PsiType -import com.intellij.psi.util.PsiTreeUtil -import com.intellij.psi.util.TypeConversionUtil - -private fun addOverrideAnnotation(psiMethod: PsiMethod, project: Project) { - TODO("Not implemented yet") -} - -fun addAnnotations(psiFile: PsiFile){ - val project = psiFile.project - WriteCommandAction.runWriteCommandAction(project) { - val psiMethods = PsiTreeUtil.findChildrenOfType(psiFile, PsiMethod::class.java) - - for (psiMethod in psiMethods) { - if (shouldAddOverrideAnnotation(psiMethod)) { - addOverrideAnnotation(psiMethod, project) - } - } - } -} - -private fun shouldAddOverrideAnnotation(psiMethod: PsiMethod): Boolean { - // Logic to determine if this method overrides a method from its superclass - val containingClass = psiMethod.containingClass ?: return false - - val superClasses = containingClass.supers - val methodName = psiMethod.name - val parameterTypes = psiMethod.parameterList.parameters.map { it.type } - - for (superClass in superClasses) { - val superMethods = superClass.methods - for (superMethod in superMethods) { - if (superMethod.name == methodName - && superMethod.parameterList.parameters.map { it.type } == parameterTypes - && isReturnTypeCompatible(superMethod.returnType, psiMethod.returnType) - ) { - return true - } - } - } - return false -} - -private fun isReturnTypeCompatible(superReturnType: PsiType?, subReturnType: PsiType?): Boolean { - if (superReturnType == null || subReturnType == null) return false - return TypeConversionUtil.isAssignable(superReturnType, subReturnType) -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt deleted file mode 100644 index 1645688..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.psi.PsiFile -import com.intellij.psi.util.PsiTreeUtil -import org.jetbrains.kotlin.psi.KtClass - -fun countKtClasses(psiFile: PsiFile) = - PsiTreeUtil.findChildrenOfType(psiFile, KtClass::class.java).toList().size diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt deleted file mode 100644 index c4c0d97..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import org.jetbrains.kotlin.psi.KtNamedFunction - -fun editFunctionName(function: KtNamedFunction, newName: String) { - val project = function.project - - WriteCommandAction.runWriteCommandAction(project) { - function.setName(newName) - } -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt deleted file mode 100644 index e2b3e99..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.jetbrains.academy.plugin.course.dev.access - -import com.intellij.openapi.command.WriteCommandAction -import com.intellij.psi.PsiFile -import com.intellij.psi.util.PsiTreeUtil -import org.jetbrains.kotlin.psi.KtClass -import org.jetbrains.kotlin.psi.KtNamedFunction - -fun sortMethods(psiFile: PsiFile) { - val project = psiFile.project - WriteCommandAction.runWriteCommandAction(project) { - val classes = PsiTreeUtil.findChildrenOfType(psiFile, KtClass::class.java) - - for (ktClass in classes){ - val methods = ktClass.declarations.filterIsInstance() - val sortedMethods = methods.sortedBy { it.name }.map { it.copy() as KtNamedFunction } - - methods.zip(sortedMethods).forEach { (original, sortedCopy) -> - original.replace(sortedCopy) - } - } - } -} diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-info.yaml deleted file mode 100644 index bedaf65..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-info.yaml +++ /dev/null @@ -1,13 +0,0 @@ -type: edu -custom_name: Psi Manipulation Basics -files: - - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt - visible: false - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt - visible: true - - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt - visible: true diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-remote-info.yaml b/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-remote-info.yaml deleted file mode 100644 index e7560fb..0000000 --- a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 395572725 diff --git a/courseSection/accessingPsiElements/lesson-info.yaml b/courseSection/accessingPsiElements/lesson-info.yaml deleted file mode 100644 index cf93469..0000000 --- a/courseSection/accessingPsiElements/lesson-info.yaml +++ /dev/null @@ -1,9 +0,0 @@ -type: framework -custom_name: Accessing PSI Elements -content: - - accessingPsiElementesTheory - - accessingPsiElementsClassCounterPlugin - - accessingPsiElementsRenamePlugin - - accessingPsiElementsSortMethodsPlugin - - accessingPsiElementsAddAnnotationsPlugin -is_template_based: false diff --git a/courseSection/accessingPsiElements/lesson-remote-info.yaml b/courseSection/accessingPsiElements/lesson-remote-info.yaml deleted file mode 100644 index b131101..0000000 --- a/courseSection/accessingPsiElements/lesson-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 1710326102 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt rename to courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt diff --git a/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-info.yaml b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-info.yaml new file mode 100644 index 0000000..5db3b66 --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-info.yaml @@ -0,0 +1,7 @@ +type: edu +custom_name: Count Number of Classes +files: + - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt + visible: false + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt + visible: true diff --git a/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-remote-info.yaml b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-remote-info.yaml new file mode 100644 index 0000000..cd76d4a --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 665818721 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task.md b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task.md similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/task.md rename to courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/task.md diff --git a/courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt b/courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsClassCounterPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt rename to courseSection/accessingPsiElementsLesson/accessingPsiElementsClassProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementesTheory/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt rename to courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt diff --git a/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-info.yaml b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-info.yaml new file mode 100644 index 0000000..d115727 --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-info.yaml @@ -0,0 +1,5 @@ +type: theory +custom_name: How to Access PSI Elements +files: + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/ElementsCounter.kt + visible: true diff --git a/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-remote-info.yaml b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-remote-info.yaml new file mode 100644 index 0000000..c1a31f1 --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 1815927707 diff --git a/courseSection/accessingPsiElements/accessingPsiElementesTheory/task.md b/courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task.md similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementesTheory/task.md rename to courseSection/accessingPsiElementsLesson/accessingPsiElementsTheoryTask/task.md diff --git a/courseSection/accessingPsiElementsLesson/lesson-info.yaml b/courseSection/accessingPsiElementsLesson/lesson-info.yaml new file mode 100644 index 0000000..998b252 --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/lesson-info.yaml @@ -0,0 +1,4 @@ +custom_name: Accessing PSI Elements +content: + - accessingPsiElementsTheoryTask + - accessingPsiElementsClassProgrammingTask diff --git a/courseSection/accessingPsiElementsLesson/lesson-remote-info.yaml b/courseSection/accessingPsiElementsLesson/lesson-remote-info.yaml new file mode 100644 index 0000000..1d60047 --- /dev/null +++ b/courseSection/accessingPsiElementsLesson/lesson-remote-info.yaml @@ -0,0 +1 @@ +id: 873950298 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt rename to courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt diff --git a/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-info.yaml b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-info.yaml new file mode 100644 index 0000000..375fc0f --- /dev/null +++ b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-info.yaml @@ -0,0 +1,7 @@ +type: edu +custom_name: Adding Annotation +files: + - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt + visible: false + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/AnnotationBuilder.kt + visible: true diff --git a/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-remote-info.yaml b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-remote-info.yaml new file mode 100644 index 0000000..dc50faf --- /dev/null +++ b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 467569043 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task.md b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/task.md rename to courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt b/courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt rename to courseSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt diff --git a/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt new file mode 100644 index 0000000..951afd8 --- /dev/null +++ b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt @@ -0,0 +1,4 @@ +package org.jetbrains.academy.plugin.course.dev.access +fun main() { + TODO() +} diff --git a/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-info.yaml b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-info.yaml new file mode 100644 index 0000000..a3a3290 --- /dev/null +++ b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-info.yaml @@ -0,0 +1,5 @@ +type: theory +custom_name: How to Add PSI Elements +files: + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt + visible: true diff --git a/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-remote-info.yaml b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-remote-info.yaml new file mode 100644 index 0000000..d4f1c44 --- /dev/null +++ b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 137115621 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task.md b/courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task.md similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/task.md rename to courseSection/addingPsiElementsLesson/addingPsiElementsTheoryTask/task.md diff --git a/courseSection/addingPsiElementsLesson/lesson-info.yaml b/courseSection/addingPsiElementsLesson/lesson-info.yaml new file mode 100644 index 0000000..c9befb0 --- /dev/null +++ b/courseSection/addingPsiElementsLesson/lesson-info.yaml @@ -0,0 +1,5 @@ +type: framework +custom_name: Adding PSI Elements +content: + - addingPsiElementsTheoryTask + - addingAnnotationsProgrammingTask diff --git a/courseSection/addingPsiElementsLesson/lesson-remote-info.yaml b/courseSection/addingPsiElementsLesson/lesson-remote-info.yaml new file mode 100644 index 0000000..79cf4f5 --- /dev/null +++ b/courseSection/addingPsiElementsLesson/lesson-remote-info.yaml @@ -0,0 +1 @@ +id: 1871269654 diff --git a/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt new file mode 100644 index 0000000..951afd8 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt @@ -0,0 +1,4 @@ +package org.jetbrains.academy.plugin.course.dev.access +fun main() { + TODO() +} diff --git a/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-info.yaml b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-info.yaml new file mode 100644 index 0000000..09cd17e --- /dev/null +++ b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-info.yaml @@ -0,0 +1,5 @@ +type: theory +custom_name: How to Edit PSI Elements +files: + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/Task.kt + visible: true diff --git a/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-remote-info.yaml b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-remote-info.yaml new file mode 100644 index 0000000..7ca89f0 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 414893730 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task.md b/courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task.md similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/task.md rename to courseSection/editingPsiElementsLesson/editingPsiElementsTheoryTask/task.md diff --git a/courseSection/editingPsiElementsLesson/lesson-info.yaml b/courseSection/editingPsiElementsLesson/lesson-info.yaml new file mode 100644 index 0000000..04fd903 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/lesson-info.yaml @@ -0,0 +1,6 @@ +type: framework +custom_name: Editing PSI Elements +content: + - editingPsiElementsTheoryTask + - renameFunctionProgrammingTask + - sortMethodsProgrammingTask diff --git a/courseSection/editingPsiElementsLesson/lesson-remote-info.yaml b/courseSection/editingPsiElementsLesson/lesson-remote-info.yaml new file mode 100644 index 0000000..f31c2a7 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/lesson-remote-info.yaml @@ -0,0 +1 @@ +id: 1189963340 diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt rename to courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt diff --git a/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-info.yaml b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-info.yaml new file mode 100644 index 0000000..41d30e6 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-info.yaml @@ -0,0 +1,7 @@ +type: edu +custom_name: Renaming Method +files: + - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt + visible: false + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/FunctionNameChanger.kt + visible: true diff --git a/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-remote-info.yaml b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-remote-info.yaml new file mode 100644 index 0000000..f5c1673 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 307246637 diff --git a/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task.md b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task.md new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/task.md @@ -0,0 +1 @@ +TODO \ No newline at end of file diff --git a/courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt b/courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsRenamePlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt rename to courseSection/editingPsiElementsLesson/renameFunctionProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt diff --git a/courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsAddAnnotationsPlugin/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt rename to courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt diff --git a/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-info.yaml b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-info.yaml new file mode 100644 index 0000000..89187a9 --- /dev/null +++ b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-info.yaml @@ -0,0 +1,7 @@ +type: edu +custom_name: Reordering Methods +files: + - name: test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt + visible: false + - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/access/PsiElementsSorter.kt + visible: true diff --git a/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-remote-info.yaml b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-remote-info.yaml new file mode 100644 index 0000000..0d1e90c --- /dev/null +++ b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task-remote-info.yaml @@ -0,0 +1 @@ +id: 1234675352 diff --git a/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task.md b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task.md new file mode 100644 index 0000000..30404ce --- /dev/null +++ b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/task.md @@ -0,0 +1 @@ +TODO \ No newline at end of file diff --git a/courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt b/courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt similarity index 100% rename from courseSection/accessingPsiElements/accessingPsiElementsSortMethodsPlugin/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt rename to courseSection/editingPsiElementsLesson/sortMethodsProgrammingTask/test/org/jetbrains/academy/plugin/course/dev/access/Tests.kt diff --git a/courseSection/psi/IntroToPsi/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt b/courseSection/introductionToPsiLesson/IntroToPsiLesson/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt similarity index 100% rename from courseSection/psi/IntroToPsi/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt rename to courseSection/introductionToPsiLesson/IntroToPsiLesson/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt diff --git a/courseSection/psi/IntroToPsi/task-info.yaml b/courseSection/introductionToPsiLesson/IntroToPsiLesson/task-info.yaml similarity index 100% rename from courseSection/psi/IntroToPsi/task-info.yaml rename to courseSection/introductionToPsiLesson/IntroToPsiLesson/task-info.yaml diff --git a/courseSection/introductionToPsiLesson/IntroToPsiLesson/task-remote-info.yaml b/courseSection/introductionToPsiLesson/IntroToPsiLesson/task-remote-info.yaml new file mode 100644 index 0000000..b785cb2 --- /dev/null +++ b/courseSection/introductionToPsiLesson/IntroToPsiLesson/task-remote-info.yaml @@ -0,0 +1 @@ +id: 853483765 diff --git a/courseSection/psi/IntroToPsi/task.md b/courseSection/introductionToPsiLesson/IntroToPsiLesson/task.md similarity index 100% rename from courseSection/psi/IntroToPsi/task.md rename to courseSection/introductionToPsiLesson/IntroToPsiLesson/task.md diff --git a/courseSection/psi/TryPsiViewer/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt similarity index 100% rename from courseSection/psi/TryPsiViewer/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt rename to courseSection/introductionToPsiLesson/TryPsiViewerLesson/src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt diff --git a/courseSection/psi/TryPsiViewer/task-info.yaml b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-info.yaml similarity index 94% rename from courseSection/psi/TryPsiViewer/task-info.yaml rename to courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-info.yaml index ba0e1a2..91891d4 100644 --- a/courseSection/psi/TryPsiViewer/task-info.yaml +++ b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-info.yaml @@ -1,4 +1,5 @@ type: choice +custom_name: Try PS Viewer is_multiple_choice: true options: - text: org.jetbrains.kotlin.psi.KtClass @@ -12,5 +13,4 @@ options: files: - name: src/main/kotlin/org/jetbrains/academy/plugin/course/dev/intro/Person.kt visible: true -custom_name: Try Psi Viewer local_check: true diff --git a/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-remote-info.yaml b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-remote-info.yaml new file mode 100644 index 0000000..d929651 --- /dev/null +++ b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task-remote-info.yaml @@ -0,0 +1 @@ +id: 726080907 diff --git a/courseSection/psi/TryPsiViewer/task.md b/courseSection/introductionToPsiLesson/TryPsiViewerLesson/task.md similarity index 100% rename from courseSection/psi/TryPsiViewer/task.md rename to courseSection/introductionToPsiLesson/TryPsiViewerLesson/task.md diff --git a/courseSection/introductionToPsiLesson/lesson-info.yaml b/courseSection/introductionToPsiLesson/lesson-info.yaml new file mode 100644 index 0000000..01ab2f9 --- /dev/null +++ b/courseSection/introductionToPsiLesson/lesson-info.yaml @@ -0,0 +1,5 @@ +type: lesson +custom_name: Introduction to PSI +content: + - IntroToPsiLesson + - TryPsiViewerLesson diff --git a/courseSection/introductionToPsiLesson/lesson-remote-info.yaml b/courseSection/introductionToPsiLesson/lesson-remote-info.yaml new file mode 100644 index 0000000..e37b32d --- /dev/null +++ b/courseSection/introductionToPsiLesson/lesson-remote-info.yaml @@ -0,0 +1 @@ +id: 1957365063 diff --git a/courseSection/psi/IntroToPsi/task-remote-info.yaml b/courseSection/psi/IntroToPsi/task-remote-info.yaml deleted file mode 100644 index 56661d3..0000000 --- a/courseSection/psi/IntroToPsi/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 635446209 diff --git a/courseSection/psi/TryPsiViewer/task-remote-info.yaml b/courseSection/psi/TryPsiViewer/task-remote-info.yaml deleted file mode 100644 index 32b944b..0000000 --- a/courseSection/psi/TryPsiViewer/task-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 838666957 diff --git a/courseSection/psi/lesson-info.yaml b/courseSection/psi/lesson-info.yaml deleted file mode 100644 index 74f6da1..0000000 --- a/courseSection/psi/lesson-info.yaml +++ /dev/null @@ -1,6 +0,0 @@ -type: framework -custom_name: Introduction to PSI -content: - - IntroToPsi - - TryPsiViewer -is_template_based: false diff --git a/courseSection/psi/lesson-remote-info.yaml b/courseSection/psi/lesson-remote-info.yaml deleted file mode 100644 index c9d96cf..0000000 --- a/courseSection/psi/lesson-remote-info.yaml +++ /dev/null @@ -1 +0,0 @@ -id: 2066652784 diff --git a/courseSection/section-info.yaml b/courseSection/section-info.yaml index df121b5..b9c4eae 100644 --- a/courseSection/section-info.yaml +++ b/courseSection/section-info.yaml @@ -1,4 +1,6 @@ custom_name: PSI content: - - psi - - accessingPsiElements + - introductionToPsiLesson + - accessingPsiElementsLesson + - editingPsiElementsLesson + - addingPsiElementsLesson diff --git a/courseSection/section-remote-info.yaml b/courseSection/section-remote-info.yaml new file mode 100644 index 0000000..a4ab068 --- /dev/null +++ b/courseSection/section-remote-info.yaml @@ -0,0 +1 @@ +id: 57896854