JetModifierList#getAnnotations() and getAnnotationEntries() by stub
This commit is contained in:
@@ -22,8 +22,8 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.stubs.IStubElementType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||
import org.jetbrains.jet.lexer.JetToken;
|
||||
|
||||
@@ -48,12 +48,12 @@ public abstract class JetModifierList extends JetElementImplStub<PsiJetModifierL
|
||||
|
||||
@NotNull
|
||||
public List<JetAnnotation> getAnnotations() {
|
||||
return findChildrenByType(JetNodeTypes.ANNOTATION);
|
||||
return getStubOrPsiChildrenAsList(JetStubElementTypes.ANNOTATION);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<JetAnnotationEntry> getAnnotationEntries() {
|
||||
List<JetAnnotationEntry> entries = findChildrenByType(JetNodeTypes.ANNOTATION_ENTRY);
|
||||
List<JetAnnotationEntry> entries = getStubOrPsiChildrenAsList(JetStubElementTypes.ANNOTATION_ENTRY);
|
||||
List<JetAnnotationEntry> answer = entries.isEmpty() ? null : Lists.newArrayList(entries);
|
||||
for (JetAnnotation annotation : getAnnotations()) {
|
||||
if (answer == null) answer = new ArrayList<JetAnnotationEntry>();
|
||||
|
||||
Reference in New Issue
Block a user