[FE] Restore source compatibility in KtPsiFactory
Prevent huge code migration in kt- release branches by returning the previously available API in deprecated status.
This commit is contained in:
@@ -25,15 +25,23 @@ import org.jetbrains.kotlin.utils.checkWithAttachment
|
|||||||
|
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
@JvmName("KtPsiFactory")
|
@JvmName("KtPsiFactory")
|
||||||
@Suppress("FunctionName", "unused")
|
@Suppress("unused")
|
||||||
@Deprecated("Use 'KtPsiFactory' constructor instead", level = DeprecationLevel.HIDDEN)
|
@Deprecated(
|
||||||
fun KtPsiFactoryOld(project: Project?, markGenerated: Boolean = true): KtPsiFactory = KtPsiFactory(project!!, markGenerated)
|
"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
|
@JvmOverloads
|
||||||
@JvmName("KtPsiFactory")
|
@JvmName("KtPsiFactory")
|
||||||
@Suppress("FunctionName", "unused")
|
@Suppress("unused")
|
||||||
@Deprecated("Use 'KtPsiFactory' constructor instead", level = DeprecationLevel.HIDDEN)
|
@Deprecated(
|
||||||
fun KtPsiFactoryOld(elementForProject: PsiElement, markGenerated: Boolean = true): KtPsiFactory =
|
"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)
|
KtPsiFactory(elementForProject.project, markGenerated)
|
||||||
|
|
||||||
private const val DO_NOT_ANALYZE_NOTIFICATION = "This file was created by KtPsiFactory and should not be analyzed\n" +
|
private const val DO_NOT_ANALYZE_NOTIFICATION = "This file was created by KtPsiFactory and should not be analyzed\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user