diff --git a/psiSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md b/psiSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md index 3bcadfd..b0e5986 100644 --- a/psiSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md +++ b/psiSection/addingPsiElementsLesson/addingAnnotationsProgrammingTask/task.md @@ -3,14 +3,14 @@ They are a form of syntactic metadata that can be added to the code but do not d The `@Deprecated` annotation marks a program element as deprecated, indicating that the element should no longer be used. -**Task** +**Task**: Implement the function ```kotlin fun addDeprecatedAnnotations(psiFile: PsiFile) ``` This function should iterate over all Kotlin functions (`KtFunction`) in the given PSI file. -For each function that does not already have a `@Deprecated` annotation, you will add one with a message indicating that the method is deprecated. +For each function that lacks a `@Deprecated` annotation, one should be added, accompanied by a message that signifies the method's deprecation.
@@ -19,11 +19,11 @@ Use `PsiTreeUtil.findChildrenOfType` to find all Kotlin function declarations (`
-Use `KtPsiFactory` to create a new annotation entry. Look into how to instantiate KtPsiFactory and use it to create annotations. +Use `KtPsiFactory` to create a new annotation entry. Learn how to instantiate `KtPsiFactory` and use it to create annotations.
Implement a helper method to check if a `KtFunction` already has a `@Deprecated` annotation. -You might find KtFunction’s `annotationEntries` property useful for this. -
\ No newline at end of file +The `annotationEntries` property of 'KtFunction' might be useful for this. +