From 132fbab53cbbb136faa3b8cc0c7041b4c114f696 Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Fri, 1 Mar 2019 20:12:39 +0300 Subject: [PATCH] [uast] removing some useless stuff --- uast/uast-common/src/org/jetbrains/uast/UastUtils.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/uast/uast-common/src/org/jetbrains/uast/UastUtils.kt b/uast/uast-common/src/org/jetbrains/uast/UastUtils.kt index 114ab6aa12f8..273af57afdaf 100644 --- a/uast/uast-common/src/org/jetbrains/uast/UastUtils.kt +++ b/uast/uast-common/src/org/jetbrains/uast/UastUtils.kt @@ -95,7 +95,8 @@ fun UElement?.getUCallExpression(searchLimit: Int = Int.MAX_VALUE): UCallExpress } }?.firstOrNull() -@Deprecated(message = "This function is deprecated, use getContainingUFile", replaceWith = ReplaceWith("getContainingUFile()")) +@Deprecated(message = "This function is deprecated, use getContainingUFile, will be removed in IDEA 2019.2", + replaceWith = ReplaceWith("getContainingUFile()")) fun UElement.getContainingFile(): UFile? = getContainingUFile() fun UElement.getContainingUFile(): UFile? = getParentOfType(UFile::class.java) @@ -110,9 +111,6 @@ fun UElement.getContainingMethod(): PsiMethod? = getContainingUMethod()?.psi @Deprecated(message = "Useless function, will be removed in IDEA 2019.1", replaceWith = ReplaceWith("getContainingUClass()?.javaPsi")) fun UElement.getContainingClass(): PsiClass? = getContainingUClass()?.psi -@Deprecated(message = "Useless function, will be removed in IDEA 2019.1", replaceWith = ReplaceWith("getContainingUVariable()?.javaPsi")) -fun UElement.getContainingVariable(): PsiVariable? = getContainingUVariable()?.psi - @Deprecated(message = "Useless function, will be removed in IDEA 2019.1", replaceWith = ReplaceWith("PsiTreeUtil.getParentOfType(this, PsiClass::class.java)")) fun PsiElement?.getContainingClass(): PsiClass? = this?.let { PsiTreeUtil.getParentOfType(it, PsiClass::class.java) } @@ -139,7 +137,8 @@ fun UElement.isUastChildOf(probablyParent: UElement?, strict: Boolean = false): return isChildOf(if (strict) uastParent else this, probablyParent) } -@Deprecated("contains a bug in negation of `strict` parameter", replaceWith = ReplaceWith("isUastChildOf(probablyElement, strict)")) +@Deprecated("contains a bug in negation of `strict` parameter, will be removed in IDEA 2019.2", + replaceWith = ReplaceWith("isUastChildOf(probablyElement, strict)")) fun UElement.isChildOf(probablyParent: UElement?, strict: Boolean = false) = isUastChildOf(probablyParent, !strict) /**