mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[uast] making UAnnotation and UDeclaration extend UAnchorOwner
This commit is contained in:
@@ -29,7 +29,7 @@ import org.jetbrains.uast.visitor.UastVisitor
|
||||
/**
|
||||
* An annotation wrapper to be used in [UastVisitor].
|
||||
*/
|
||||
interface UAnnotation : UElement, UResolvable {
|
||||
interface UAnnotation : UElement, UResolvable, UAnchorOwner {
|
||||
|
||||
override val javaPsi: PsiAnnotation?
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.uast.visitor.UastTypedVisitor
|
||||
/**
|
||||
* A [PsiElement] declaration wrapper.
|
||||
*/
|
||||
interface UDeclaration : UElement, PsiModifierListOwner, UAnnotated {
|
||||
interface UDeclaration : UElement, PsiModifierListOwner, UAnnotated, UAnchorOwner {
|
||||
/**
|
||||
* Returns the original declaration (which is *always* unwrapped, never a [UDeclaration]).
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ interface UDeclaration : UElement, PsiModifierListOwner, UAnnotated {
|
||||
*
|
||||
* It is useful for putting gutters and inspection reports.
|
||||
*/
|
||||
val uastAnchor: UElement?
|
||||
override val uastAnchor: UIdentifier?
|
||||
|
||||
/**
|
||||
* Returns `true` if this declaration has a [PsiModifier.STATIC] modifier.
|
||||
@@ -81,8 +81,6 @@ fun UDeclaration?.getAnchorPsi():PsiElement? {
|
||||
|
||||
/**
|
||||
* A base interface for every [UElement] which have a name identifier. As analogy to [PsiNameIdentifierOwner]
|
||||
*
|
||||
* Note: [UDeclaration] and [UAnnotation] will extend this interface after all implementations will do
|
||||
*/
|
||||
interface UAnchorOwner : UElement {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user