diff --git a/compiler/psi/src/org/jetbrains/kotlin/KtNodeTypes.java b/compiler/psi/src/org/jetbrains/kotlin/KtNodeTypes.java index ce6a9226723..64e6708e80e 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/KtNodeTypes.java +++ b/compiler/psi/src/org/jetbrains/kotlin/KtNodeTypes.java @@ -65,7 +65,7 @@ public interface KtNodeTypes { IElementType VALUE_ARGUMENT_LIST = KtStubElementTypes.VALUE_ARGUMENT_LIST; IElementType VALUE_ARGUMENT = KtStubElementTypes.VALUE_ARGUMENT; IElementType LAMBDA_ARGUMENT = KtStubElementTypes.LAMBDA_ARGUMENT; - KtNodeType VALUE_ARGUMENT_NAME = new KtNodeType("VALUE_ARGUMENT_NAME", KtValueArgumentName.class); + IElementType VALUE_ARGUMENT_NAME = KtStubElementTypes.VALUE_ARGUMENT_NAME; IElementType TYPE_REFERENCE = KtStubElementTypes.TYPE_REFERENCE; IElementType USER_TYPE = KtStubElementTypes.USER_TYPE; diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtValueArgumentName.java b/compiler/psi/src/org/jetbrains/kotlin/psi/KtValueArgumentName.java index 1f27f9aa11b..72576847817 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtValueArgumentName.java +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtValueArgumentName.java @@ -20,12 +20,18 @@ import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.KtNodeTypes; import org.jetbrains.kotlin.name.Name; +import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub; +import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes; -public class KtValueArgumentName extends KtElementImpl implements ValueArgumentName { +public class KtValueArgumentName extends KtElementImplStub> implements ValueArgumentName { public KtValueArgumentName(@NotNull ASTNode node) { super(node); } + public KtValueArgumentName(@NotNull KotlinPlaceHolderStub stub) { + super(stub, KtStubElementTypes.VALUE_ARGUMENT_NAME); + } + @Override @NotNull public KtSimpleNameExpression getReferenceExpression() { diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt index 7a3650709ca..da505c51c65 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt @@ -23,7 +23,7 @@ object KotlinStubVersions { // Though only kotlin declarations (no code in the bodies) are stubbed, please do increase this version // if you are not 100% sure it can be avoided. // Increasing this version will lead to reindexing of all kotlin source files on the first IDE startup with the new version. - const val SOURCE_STUB_VERSION = 129 + const val SOURCE_STUB_VERSION = 130 // Binary stub version should be increased if stub format (org.jetbrains.kotlin.psi.stubs.impl) is changed // or changes are made to the core stub building code (org.jetbrains.kotlin.idea.decompiler.stubBuilder). diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtStubElementTypes.java b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtStubElementTypes.java index 9bfd1195065..a36ae722bf2 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtStubElementTypes.java +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/elements/KtStubElementTypes.java @@ -110,6 +110,9 @@ public interface KtStubElementTypes { KtPlaceHolderStubElementType LAMBDA_ARGUMENT = new KtPlaceHolderStubElementType<>("LAMBDA_ARGUMENT", KtLambdaArgument.class); + KtPlaceHolderStubElementType VALUE_ARGUMENT_NAME = + new KtPlaceHolderStubElementType<>("VALUE_ARGUMENT_NAME", KtValueArgumentName.class); + KtPlaceHolderStubElementType SUPER_TYPE_LIST = new KtPlaceHolderStubElementType<>("SUPER_TYPE_LIST", KtSuperTypeList.class); diff --git a/idea/testData/stubs/AnnotationValues.expected b/idea/testData/stubs/AnnotationValues.expected index 0ed705e9d3c..64c7f25ea34 100644 --- a/idea/testData/stubs/AnnotationValues.expected +++ b/idea/testData/stubs/AnnotationValues.expected @@ -63,9 +63,17 @@ PsiJetFileStubImpl[package=test] VALUE_ARGUMENT VALUE_ARGUMENT VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=f] VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=c] VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=b1] VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=b2] CLASS[fqName=test.StringLiteral, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=StringLiteral, superNames=[]] MODIFIER_LIST[annotation] PRIMARY_CONSTRUCTOR @@ -128,6 +136,8 @@ PsiJetFileStubImpl[package=test] REFERENCE_EXPRESSION[referencedName=E1] VALUE_ARGUMENT VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=e3] CLASS[fqName=test.VarArg, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=VarArg, superNames=[]] MODIFIER_LIST[annotation] PRIMARY_CONSTRUCTOR @@ -259,3 +269,5 @@ PsiJetFileStubImpl[package=test] VALUE_ARGUMENT_LIST VALUE_ARGUMENT VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=nested] diff --git a/idea/testData/stubs/AnnotationWithValue.expected b/idea/testData/stubs/AnnotationWithValue.expected index ebea5f56b17..bdab44940a3 100644 --- a/idea/testData/stubs/AnnotationWithValue.expected +++ b/idea/testData/stubs/AnnotationWithValue.expected @@ -23,3 +23,5 @@ PsiJetFileStubImpl[package=] VALUE_ARGUMENT_LIST VALUE_ARGUMENT VALUE_ARGUMENT + VALUE_ARGUMENT_NAME + REFERENCE_EXPRESSION[referencedName=other]