From 3dbc77c80900dedb8d3327bba2b0afa36fa99689 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Fri, 4 Apr 2014 19:55:40 +0400 Subject: [PATCH] Stubs for JetConstructorCalleeExpression --- .../frontend/src/org/jetbrains/jet/JetNodeTypes.java | 2 +- .../jet/lang/psi/JetConstructorCalleeExpression.java | 9 ++++++++- .../jet/lang/psi/stubs/elements/JetStubElementTypes.java | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java index 7e46068a1ab..2e930816423 100644 --- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java @@ -46,7 +46,7 @@ public interface JetNodeTypes { IElementType DELEGATOR_SUPER_CALL = JetStubElementTypes.DELEGATOR_SUPER_CALL; IElementType DELEGATOR_SUPER_CLASS = JetStubElementTypes.DELEGATOR_SUPER_CLASS; JetNodeType PROPERTY_DELEGATE = new JetNodeType("PROPERTY_DELEGATE", JetPropertyDelegate.class); - JetNodeType CONSTRUCTOR_CALLEE = new JetNodeType("CONSTRUCTOR_CALLEE", JetConstructorCalleeExpression.class); + IElementType CONSTRUCTOR_CALLEE = JetStubElementTypes.CONSTRUCTOR_CALLEE; IElementType VALUE_PARAMETER_LIST = JetStubElementTypes.VALUE_PARAMETER_LIST; IElementType VALUE_PARAMETER = JetStubElementTypes.VALUE_PARAMETER; diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java index 48a284c55f0..4322a4c4bf0 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java @@ -17,14 +17,21 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; +import com.intellij.psi.stubs.IStubElementType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; +import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; -public class JetConstructorCalleeExpression extends JetExpressionImpl { +public class JetConstructorCalleeExpression extends JetExpressionImplStub> { public JetConstructorCalleeExpression(@NotNull ASTNode node) { super(node); } + public JetConstructorCalleeExpression(@NotNull PsiJetPlaceHolderStub stub) { + super(stub, JetStubElementTypes.CONSTRUCTOR_CALLEE); + } + @Nullable @IfNotParsed public JetTypeReference getTypeReference() { return findChildByClass(JetTypeReference.class); 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 47210f3f0ea..2478beb8e18 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 @@ -95,7 +95,9 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType THIS_CALL = new JetPlaceHolderStubElementType("THIS_CALL", JetDelegatorToThisCall.class); - + JetPlaceHolderStubElementType CONSTRUCTOR_CALLEE = + new JetPlaceHolderStubElementType("CONSTRUCTOR_CALLEE", JetConstructorCalleeExpression.class); + TokenSet DECLARATION_TYPES = TokenSet.create(CLASS, OBJECT_DECLARATION, CLASS_OBJECT, FUNCTION, PROPERTY, ANONYMOUS_INITIALIZER, ENUM_ENTRY);