mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
UAST: JavaUMethod uastAnchor must return element from library source if its sourcePsi is in library source file
GitOrigin-RevId: 6bd321130bd6d27202cffd4345d7935f97ce01cc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d71ea6b5f7
commit
f385726405
@@ -33,7 +33,9 @@ open class JavaUMethod(
|
||||
|
||||
override val uastAnchor: UIdentifier?
|
||||
get() {
|
||||
val psiElement = (sourcePsi.originalElement as? PsiNameIdentifierOwner)?.nameIdentifier ?: sourcePsi.nameIdentifier
|
||||
val psiElement = (sourcePsi as? PsiNameIdentifierOwner)?.nameIdentifier // return elements of library sources, do not switch to binary
|
||||
?: (sourcePsi.originalElement as? PsiNameIdentifierOwner)?.nameIdentifier
|
||||
?: sourcePsi.nameIdentifier
|
||||
if (psiElement?.isPhysical != true) return null // hah there is a Lombok and we have fake PsiElements even in Java (IDEA-216248)
|
||||
return UIdentifier(psiElement, this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user