diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java index acb819dba22..f2411fe2334 100644 --- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java @@ -55,8 +55,8 @@ public interface JetNodeTypes { IElementType IMPORT_DIRECTIVE = JetStubElementTypes.IMPORT_DIRECTIVE; IElementType MODIFIER_LIST = JetStubElementTypes.MODIFIER_LIST; IElementType PRIMARY_CONSTRUCTOR_MODIFIER_LIST = JetStubElementTypes.PRIMARY_CONSTRUCTOR_MODIFIER_LIST; - JetNodeType ANNOTATION = new JetNodeType("ANNOTATION", JetAnnotation.class); - IElementType ANNOTATION_ENTRY = JetStubElementTypes.ANNOTATION_ENTRY; + IElementType ANNOTATION = JetStubElementTypes.ANNOTATION; + IElementType ANNOTATION_ENTRY = JetStubElementTypes.ANNOTATION_ENTRY; JetNodeType TYPE_ARGUMENT_LIST = new JetNodeType("TYPE_ARGUMENT_LIST", JetTypeArgumentList.class); JetNodeType VALUE_ARGUMENT_LIST = new JetNodeType("VALUE_ARGUMENT_LIST", JetValueArgumentList.class); 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 ac8ad668b5e..35f845634cb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotation.java @@ -19,14 +19,20 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.JetNodeTypes; +import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; +import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import java.util.List; -public class JetAnnotation extends JetElementImpl { +public class JetAnnotation extends JetElementImplStub> { public JetAnnotation(@NotNull ASTNode node) { super(node); } + public JetAnnotation(PsiJetPlaceHolderStub stub) { + super(stub, JetStubElementTypes.ANNOTATION); + } + @Override public R accept(@NotNull JetVisitor visitor, D data) { return visitor.visitAnnotation(this, data); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java index c0eec054806..b493622a79e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java @@ -36,6 +36,8 @@ public interface JetStubElementTypes { new JetPlaceHolderStubElementType("TYPE_PARAMETER_LIST", JetTypeParameterList.class); JetAnnotationEntryElementType ANNOTATION_ENTRY = new JetAnnotationEntryElementType("ANNOTATION_ENTRY"); + JetPlaceHolderStubElementType ANNOTATION = + new JetPlaceHolderStubElementType("ANNOTATION", JetAnnotation.class); JetPlaceHolderStubElementType CLASS_BODY = new JetPlaceHolderStubElementType("CLASS_BODY", JetClassBody.class);