mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
IDEA-355006 [spring] Data: support projections for Kotlin
(cherry picked from commit e0379d8d3ba26b7059290b34d8221cd9db682630) IJ-CR-167519 GitOrigin-RevId: a33d24afc547e3e1f45772349bf7f88ddae6aab9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
50ad35a13b
commit
860ac1387d
@@ -222,7 +222,7 @@ val DEFAULT_EXPRESSION_TYPES_LIST: Array<Class<out UExpression>> = arrayOf(UExpr
|
|||||||
fun getPossiblePsiSourceTypes(language: Language, vararg uastTypes: Class<out UElement>): ClassSet<PsiElement> =
|
fun getPossiblePsiSourceTypes(language: Language, vararg uastTypes: Class<out UElement>): ClassSet<PsiElement> =
|
||||||
UastFacade.findPlugin(language)?.getPossiblePsiSourceTypes(*uastTypes) ?: emptyClassSet()
|
UastFacade.findPlugin(language)?.getPossiblePsiSourceTypes(*uastTypes) ?: emptyClassSet()
|
||||||
|
|
||||||
private fun getFirstUElement(psiElement: PsiElement, strict: Boolean = false): UElement? {
|
fun getFirstUElement(psiElement: PsiElement, strict: Boolean = false): UElement? {
|
||||||
val startingElement = if (strict) psiElement.parent else psiElement
|
val startingElement = if (strict) psiElement.parent else psiElement
|
||||||
val parentSequence = generateSequence(startingElement, PsiElement::getParent)
|
val parentSequence = generateSequence(startingElement, PsiElement::getParent)
|
||||||
return parentSequence.mapNotNull { it.toUElement() }.firstOrNull()
|
return parentSequence.mapNotNull { it.toUElement() }.firstOrNull()
|
||||||
|
|||||||
Reference in New Issue
Block a user