diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt index d36ceb3ee0c..649bac4c16e 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt @@ -25,15 +25,23 @@ import org.jetbrains.kotlin.utils.checkWithAttachment @JvmOverloads @JvmName("KtPsiFactory") -@Suppress("FunctionName", "unused") -@Deprecated("Use 'KtPsiFactory' constructor instead", level = DeprecationLevel.HIDDEN) -fun KtPsiFactoryOld(project: Project?, markGenerated: Boolean = true): KtPsiFactory = KtPsiFactory(project!!, markGenerated) +@Suppress("unused") +@Deprecated( + "Use 'KtPsiFactory' constructor instead", + level = DeprecationLevel.WARNING, + replaceWith = ReplaceWith("KtPsiFactory(project!!, markGenerated)", "org.jetbrains.kotlin.psi.KtPsiFactory") +) +fun KtPsiFactory(project: Project?, markGenerated: Boolean = true): KtPsiFactory = KtPsiFactory(project!!, markGenerated) @JvmOverloads @JvmName("KtPsiFactory") -@Suppress("FunctionName", "unused") -@Deprecated("Use 'KtPsiFactory' constructor instead", level = DeprecationLevel.HIDDEN) -fun KtPsiFactoryOld(elementForProject: PsiElement, markGenerated: Boolean = true): KtPsiFactory = +@Suppress("unused") +@Deprecated( + "Use 'KtPsiFactory' constructor instead", + level = DeprecationLevel.WARNING, + replaceWith = ReplaceWith("KtPsiFactory(elementForProject.project, markGenerated)", "org.jetbrains.kotlin.psi.KtPsiFactory") +) +fun KtPsiFactory(elementForProject: PsiElement, markGenerated: Boolean = true): KtPsiFactory = KtPsiFactory(elementForProject.project, markGenerated) private const val DO_NOT_ANALYZE_NOTIFICATION = "This file was created by KtPsiFactory and should not be analyzed\n" +