From dc7708188dfc5a60f8e00756e4af4ded44ba432f Mon Sep 17 00:00:00 2001 From: Danil Pavlov Date: Wed, 25 Aug 2021 14:13:43 +0000 Subject: [PATCH] IJPF-CR-1427, minor stylistic changes (cherry picked from commit 608dd146c0eb947e042a782eb29f95c97a2bb483) IJ-MR-12967 GitOrigin-RevId: 1cd1ef26a005b0bf4056fbeb2fc4b492bb8c065a --- .../jetbrains/kotlin/idea/quickfix/AddFileAnnotationFix.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/AddFileAnnotationFix.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/AddFileAnnotationFix.kt index 5e17c4ea95ce..4aa9253a7d8f 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/AddFileAnnotationFix.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/AddFileAnnotationFix.kt @@ -17,7 +17,7 @@ import org.jetbrains.kotlin.renderer.render * A quick fix to add file-level annotations, e.g. `@file:OptIn(SomeExperimentalAnnotation::class)`. * * The fix either creates a new annotation or adds the argument to the existing annotation entry. - * It does not check whether the annotation class allows duplicating annotations, it is the caller responsibility. + * It does not check whether the annotation class allows duplicating annotations; it is the caller responsibility. * For example, only one `@file:OptIn(...)` annotation is allowed, so if this annotation entry already exists, * the caller should pass the non-null smart pointer to it as the `existingAnnotationEntry` argument. * @@ -52,7 +52,7 @@ class AddFileAnnotationFix( val psiFactory = KtPsiFactory(fileToAnnotate) if (fileToAnnotate.fileAnnotationList == null) { - // If there is no existing file-level annotations, create an annotation list with the new annotation + // If there are no existing file-level annotations, create an annotation list with the new annotation val newAnnotationList = psiFactory.createFileAnnotationListWithAnnotation(annotationText) val createdAnnotationList = replaceFileAnnotationList(fileToAnnotate, newAnnotationList) fileToAnnotate.addAfter(psiFactory.createWhiteSpace("\n"), createdAnnotationList)