mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[uast] removing some useless stuff
This commit is contained in:
@@ -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)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user