Stubs for JetAnnotation

This commit is contained in:
Pavel V. Talanov
2014-03-26 17:29:38 +04:00
parent 7e59f0d68c
commit 2e23d27b0d
3 changed files with 11 additions and 3 deletions
@@ -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);
@@ -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<PsiJetPlaceHolderStub<JetAnnotation>> {
public JetAnnotation(@NotNull ASTNode node) {
super(node);
}
public JetAnnotation(PsiJetPlaceHolderStub<JetAnnotation> stub) {
super(stub, JetStubElementTypes.ANNOTATION);
}
@Override
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
return visitor.visitAnnotation(this, data);
@@ -36,6 +36,8 @@ public interface JetStubElementTypes {
new JetPlaceHolderStubElementType<JetTypeParameterList>("TYPE_PARAMETER_LIST", JetTypeParameterList.class);
JetAnnotationEntryElementType ANNOTATION_ENTRY = new JetAnnotationEntryElementType("ANNOTATION_ENTRY");
JetPlaceHolderStubElementType<JetAnnotation> ANNOTATION =
new JetPlaceHolderStubElementType<JetAnnotation>("ANNOTATION", JetAnnotation.class);
JetPlaceHolderStubElementType<JetClassBody> CLASS_BODY =
new JetPlaceHolderStubElementType<JetClassBody>("CLASS_BODY", JetClassBody.class);