diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/ConflictingExtensionPropertyInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/ConflictingExtensionPropertyInspection.kt index 15a1ecd400e..aa119ac51a5 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/ConflictingExtensionPropertyInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/ConflictingExtensionPropertyInspection.kt @@ -223,14 +223,13 @@ public class ConflictingExtensionPropertyInspection : AbstractKotlinInspection() } private class MarkHiddenAndDeprecatedAction(property: JetProperty) : JetIntentionAction(property) { - override fun getFamilyName() = "Mark with @HiddenDeclaration and @Deprecated" + override fun getFamilyName() = "Mark as @Deprecated(..., level = DeprecationLevel.HIDDEN)" override fun getText() = familyName override fun invoke(project: Project, editor: Editor?, file: JetFile) { val factory = JetPsiFactory(project) val name = element.nameAsName!!.render() - element.addAnnotationWithLineBreak(factory.createAnnotationEntry("@Deprecated(\"Is replaced with automatic synthetic extension\", ReplaceWith(\"$name\"))")) - element.addAnnotationWithLineBreak(factory.createAnnotationEntry("@HiddenDeclaration")) + element.addAnnotationWithLineBreak(factory.createAnnotationEntry("@Deprecated(\"Is replaced with automatic synthetic extension\", ReplaceWith(\"$name\"), level = DeprecationLevel.HIDDEN)")) } //TODO: move into PSI? diff --git a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt index 0fa89094e59..b1c8206dc08 100644 --- a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt +++ b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt @@ -1,4 +1,4 @@ -// "Mark with @HiddenDeclaration and @Deprecated" "true" +// "Mark as @Deprecated(..., level = DeprecationLevel.HIDDEN)" "true" import java.io.File val File.name: String diff --git a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after index 7d7bd494c69..e2d63762f8c 100644 --- a/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after +++ b/idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt.after @@ -1,7 +1,6 @@ -// "Mark with @HiddenDeclaration and @Deprecated" "true" +// "Mark as @Deprecated(..., level = DeprecationLevel.HIDDEN)" "true" import java.io.File -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name"), level = DeprecationLevel.HIDDEN) val File.name: String get() = getName() \ No newline at end of file