From bb26e08b7b55b04dcf4ce126693f8d59d06ba3df Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 26 Mar 2014 17:53:29 +0400 Subject: [PATCH] JetTypeReference#getAttributeAnnotations() by stubs --- .../src/org/jetbrains/jet/lang/psi/JetAnnotation.java | 1 + .../src/org/jetbrains/jet/lang/psi/JetTypeReference.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java index 35f845634cb..454f7245727 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java @@ -25,6 +25,7 @@ import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import java.util.List; public class JetAnnotation extends JetElementImplStub> { + public JetAnnotation(@NotNull ASTNode node) { super(node); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypeReference.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypeReference.java index 73e250c6da9..de8092472c3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypeReference.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypeReference.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.JetNodeTypes; import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; @@ -27,6 +26,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.ANNOTATION; + /** * Type reference element. * Underlying token is {@link org.jetbrains.jet.JetNodeTypes#TYPE_REFERENCE} @@ -45,8 +46,9 @@ public class JetTypeReference extends JetElementImplStub getAttributeAnnotations() { - return findChildrenByType(JetNodeTypes.ANNOTATION); + return getStubOrPsiChildrenAsList(ANNOTATION); } @Nullable