diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionLiteral.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionLiteral.java index db29d484327..f8d876860fc 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionLiteral.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetFunctionLiteral.java @@ -20,6 +20,7 @@ import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lexer.JetTokens; public class JetFunctionLiteral extends JetFunctionNotStubbed { @@ -66,4 +67,10 @@ public class JetFunctionLiteral extends JetFunctionNotStubbed { public ASTNode getArrowNode() { return getNode().findChildByType(JetTokens.ARROW); } + + @Nullable + @Override + public FqName getFqName() { + return null; + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetMultiDeclarationEntry.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetMultiDeclarationEntry.java index 73e4023f127..efa35f74e67 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetMultiDeclarationEntry.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetMultiDeclarationEntry.java @@ -21,6 +21,7 @@ import com.intellij.psi.tree.TokenSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; +import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lexer.JetTokens; import static org.jetbrains.jet.lexer.JetTokens.VAL_KEYWORD; @@ -63,4 +64,10 @@ public class JetMultiDeclarationEntry extends JetNamedDeclarationNotStubbed impl public ASTNode getValOrVarNode() { return getParentNode().findChildByType(TokenSet.create(VAL_KEYWORD, VAR_KEYWORD)); } + + @Nullable + @Override + public FqName getFqName() { + return null; + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclaration.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclaration.java index 369b62f5f26..60f90818ab2 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclaration.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclaration.java @@ -19,9 +19,12 @@ package org.jetbrains.jet.lang.psi; import com.intellij.psi.PsiNameIdentifierOwner; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lang.resolve.name.Name; public interface JetNamedDeclaration extends JetDeclaration, PsiNameIdentifierOwner, JetStatementExpression, JetNamed { @NotNull Name getNameAsSafeName(); + @Nullable + FqName getFqName(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclarationStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclarationStub.java index 645870e82ea..c0d3c5ecfef 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclarationStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedDeclarationStub.java @@ -21,14 +21,16 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.search.LocalSearchScope; import com.intellij.psi.search.SearchScope; import com.intellij.psi.stubs.IStubElementType; -import com.intellij.psi.stubs.NamedStub; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.lang.psi.stubs.PsiJetStubWithFqName; +import org.jetbrains.jet.lang.resolve.name.FqName; import org.jetbrains.jet.lang.resolve.name.Name; import org.jetbrains.jet.lexer.JetTokens; -abstract class JetNamedDeclarationStub extends JetDeclarationStub implements JetNamedDeclaration { +abstract class JetNamedDeclarationStub extends JetDeclarationStub implements JetNamedDeclaration { public JetNamedDeclarationStub(@NotNull T stub, @NotNull IStubElementType nodeType) { super(stub, nodeType); } @@ -92,4 +94,14 @@ abstract class JetNamedDeclarationStub extends JetDeclarati return super.getUseScope(); } + + @Nullable + @Override + public FqName getFqName() { + T stub = getStub(); + if (stub != null) { + return stub.getFqName(); + } + return JetPsiUtil.getFQName(this); + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedFunction.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedFunction.java index 64be9ecfc13..91f4d299df0 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedFunction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNamedFunction.java @@ -27,8 +27,6 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; -import org.jetbrains.jet.lang.resolve.name.FqName; -import org.jetbrains.jet.lang.resolve.name.Name; import org.jetbrains.jet.lexer.JetTokens; import java.util.Collections; @@ -76,35 +74,6 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub extends JetNamedDeclarationStub implements JetTypeParameterListOwner { +abstract class JetTypeParameterListOwnerStub extends JetNamedDeclarationStub implements JetTypeParameterListOwner { public JetTypeParameterListOwnerStub(@NotNull T stub, @NotNull IStubElementType nodeType) { super(stub, nodeType); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypedef.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypedef.java index 02aab712489..e0600e5effb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypedef.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetTypedef.java @@ -20,6 +20,7 @@ import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; +import org.jetbrains.jet.lang.resolve.name.FqName; public class JetTypedef extends JetTypeParameterListOwnerNotStubbed { public JetTypedef(@NotNull ASTNode node) { @@ -35,4 +36,11 @@ public class JetTypedef extends JetTypeParameterListOwnerNotStubbed { public JetTypeReference getTypeReference() { return (JetTypeReference) findChildByType(JetNodeTypes.TYPE_REFERENCE); } + + @Nullable + @Override + public FqName getFqName() { + //TODO: typedefs are unsupported + return null; + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java index d843f73affc..cb17f51a2e8 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java @@ -16,16 +16,10 @@ package org.jetbrains.jet.lang.psi.stubs; -import com.intellij.psi.stubs.NamedStub; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetNamedFunction; -import org.jetbrains.jet.lang.resolve.name.FqName; - -public interface PsiJetFunctionStub extends NamedStub { - @Nullable - FqName getTopFQName(); +public interface PsiJetFunctionStub extends PsiJetStubWithFqName { /** * Is function defined in directly in package. * @return diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java index a2d63841de3..5b7d9c53ecd 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java @@ -16,17 +16,14 @@ package org.jetbrains.jet.lang.psi.stubs; -import com.intellij.psi.stubs.NamedStub; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetParameter; -public interface PsiJetParameterStub extends NamedStub { +public interface PsiJetParameterStub extends PsiJetStubWithFqName { boolean isMutable(); boolean isVarArg(); - @Nullable String getTypeText(); - @Nullable String getDefaultValueText(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetPropertyStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetPropertyStub.java index 9a5389abb1e..4a1bd10143d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetPropertyStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetPropertyStub.java @@ -16,19 +16,11 @@ package org.jetbrains.jet.lang.psi.stubs; -import com.intellij.psi.stubs.NamedStub; -import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetProperty; -import org.jetbrains.jet.lang.resolve.name.FqName; -public interface PsiJetPropertyStub extends NamedStub { +public interface PsiJetPropertyStub extends PsiJetStubWithFqName { boolean isVar(); - boolean isTopLevel(); - - @Nullable - FqName getTopFQName(); - String getTypeText(); String getInferenceBodyText(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetTypeParameterStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetTypeParameterStub.java index b5c385106d3..3e306c3708f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetTypeParameterStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetTypeParameterStub.java @@ -16,10 +16,9 @@ package org.jetbrains.jet.lang.psi.stubs; -import com.intellij.psi.stubs.NamedStub; import org.jetbrains.jet.lang.psi.JetTypeParameter; -public interface PsiJetTypeParameterStub extends NamedStub { +public interface PsiJetTypeParameterStub extends PsiJetStubWithFqName { String getExtendBoundTypeText(); boolean isInVariance(); boolean isOutVariance(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java index 0ee3556c5a2..8554370e24d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java @@ -57,7 +57,7 @@ public class JetClassElementType extends JetStubElementType superNames = PsiUtilPackage.getSuperNames(psi); return new PsiJetClassStubImpl( diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java index 0f90cf79e2a..942ab5d69d7 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetFunctionElementType.java @@ -77,8 +77,8 @@ public class JetFunctionElementType extends JetStubElementType"); return new PsiJetPropertyStubImpl(JetStubElementTypes.PROPERTY, parentStub, - psi.getName(), psi.isVar(), psi.isTopLevel(), JetPsiUtil.getFQName(psi), + psi.getName(), psi.isVar(), psi.isTopLevel(), psi.getFqName(), typeRef != null ? typeRef.getText() : null, expression != null ? expression.getText() : null); } @@ -84,8 +83,8 @@ public class JetPropertyElementType extends JetStubElementType implement private final StringRef nameRef; private final boolean isTopLevel; private final boolean isExtension; - private final FqName topFQName; + private final FqName fqName; public PsiJetFunctionStubImpl( @NotNull IStubElementType elementType, @NotNull StubElement parent, @Nullable String name, boolean isTopLevel, - @Nullable FqName topFQName, + @Nullable FqName fqName, boolean isExtension) { - this(elementType, parent, StringRef.fromString(name), isTopLevel, topFQName, isExtension); + this(elementType, parent, StringRef.fromString(name), isTopLevel, fqName, isExtension); } public PsiJetFunctionStubImpl( @@ -49,16 +49,16 @@ public class PsiJetFunctionStubImpl extends StubBase implement @NotNull StubElement parent, @Nullable StringRef nameRef, boolean isTopLevel, - @Nullable FqName topFQName, + @Nullable FqName fqName, boolean isExtension) { super(parent, elementType); - if (isTopLevel && topFQName == null) { - throw new IllegalArgumentException("topFQName shouldn't be null for top level functions"); + if (isTopLevel && fqName == null) { + throw new IllegalArgumentException("fqName shouldn't be null for top level functions"); } this.nameRef = nameRef; - this.topFQName = topFQName; + this.fqName = fqName; this.isTopLevel = isTopLevel; this.isExtension = isExtension; } @@ -68,12 +68,6 @@ public class PsiJetFunctionStubImpl extends StubBase implement return StringRef.toString(nameRef); } - @Nullable - @Override - public FqName getTopFQName() { - return topFQName; - } - @Override public boolean isTopLevel() { return isTopLevel; @@ -97,8 +91,8 @@ public class PsiJetFunctionStubImpl extends StubBase implement builder.append("PsiJetFunctionStubImpl["); if (isTopLevel()) { - assert topFQName != null; - builder.append("top ").append("topFQName=").append(topFQName.toString()).append(" "); + assert fqName != null; + builder.append("top ").append("fqName=").append(fqName.toString()).append(" "); } if (isExtension()) { @@ -111,4 +105,10 @@ public class PsiJetFunctionStubImpl extends StubBase implement return builder.toString(); } + + @Nullable + @Override + public FqName getFqName() { + return fqName; + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetParameterStubImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetParameterStubImpl.java index c23730e8aa3..3b838a9a8b1 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetParameterStubImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetParameterStubImpl.java @@ -23,6 +23,7 @@ import com.intellij.util.io.StringRef; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetParameter; import org.jetbrains.jet.lang.psi.stubs.PsiJetParameterStub; +import org.jetbrains.jet.lang.resolve.name.FqName; public class PsiJetParameterStubImpl extends StubBase implements PsiJetParameterStub { private final StringRef name; @@ -30,26 +31,33 @@ public class PsiJetParameterStubImpl extends StubBase implements P private final boolean isVarArg; private final StringRef typeText; private final StringRef defaultValueText; + private final FqName fqName; - public PsiJetParameterStubImpl(IStubElementType elementType, StubElement parent, - StringRef name, + public PsiJetParameterStubImpl( + IStubElementType elementType, StubElement parent, + FqName fqName, StringRef name, boolean isMutable, boolean isVarArg, - StringRef typeText, StringRef defaultValueText) { + StringRef typeText, StringRef defaultValueText + ) { super(parent, elementType); this.name = name; this.isMutable = isMutable; this.isVarArg = isVarArg; this.typeText = typeText; this.defaultValueText = defaultValueText; + this.fqName = fqName; } - public PsiJetParameterStubImpl(IStubElementType elementType, StubElement parent, - String name, + public PsiJetParameterStubImpl( + IStubElementType elementType, StubElement parent, + FqName fqName, String name, boolean isMutable, boolean isVarArg, - String typeText, String defaultValueText) { - this(elementType, parent, StringRef.fromString(name), isMutable, isVarArg, + String typeText, + String defaultValueText + ) { + this(elementType, parent, fqName, StringRef.fromString(name), isMutable, isVarArg, StringRef.fromString(typeText), StringRef.fromString(defaultValueText)); } @@ -91,6 +99,9 @@ public class PsiJetParameterStubImpl extends StubBase implements P } builder.append("name=").append(getName()); + if (fqName != null) { + builder.append(" fqName=").append(fqName.toString()).append(" "); + } builder.append(" typeText=").append(getTypeText()); builder.append(" defaultValue=").append(getDefaultValueText()); @@ -98,4 +109,10 @@ public class PsiJetParameterStubImpl extends StubBase implements P return builder.toString(); } + + @Nullable + @Override + public FqName getFqName() { + return fqName; + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetPropertyStubImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetPropertyStubImpl.java index af20d041a6a..373d450eb37 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetPropertyStubImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetPropertyStubImpl.java @@ -29,22 +29,22 @@ public class PsiJetPropertyStubImpl extends StubBase implements Psi private final StringRef name; private final boolean isVar; private final boolean isTopLevel; - private final FqName topFQName; + private final FqName fqName; private final StringRef typeText; private final StringRef inferenceBodyText; public PsiJetPropertyStubImpl(IStubElementType elementType, StubElement parent, StringRef name, - boolean isVar, boolean isTopLevel, @Nullable FqName topFQName, StringRef typeText, StringRef inferenceBodyText) { + boolean isVar, boolean isTopLevel, @Nullable FqName fqName, StringRef typeText, StringRef inferenceBodyText) { super(parent, elementType); - if (isTopLevel && topFQName == null) { - throw new IllegalArgumentException("topFQName shouldn't be null for top level properties"); + if (isTopLevel && fqName == null) { + throw new IllegalArgumentException("fqName shouldn't be null for top level properties"); } this.name = name; this.isVar = isVar; this.isTopLevel = isTopLevel; - this.topFQName = topFQName; + this.fqName = fqName; this.typeText = typeText; this.inferenceBodyText = inferenceBodyText; } @@ -69,8 +69,8 @@ public class PsiJetPropertyStubImpl extends StubBase implements Psi @Nullable @Override - public FqName getTopFQName() { - return topFQName; + public FqName getFqName() { + return fqName; } @Override @@ -97,8 +97,8 @@ public class PsiJetPropertyStubImpl extends StubBase implements Psi builder.append(isVar() ? "var " : "val "); if (isTopLevel()) { - assert topFQName != null; - builder.append("top ").append("topFQName=").append(topFQName.toString()).append(" "); + assert fqName != null; + builder.append("top ").append("fqName=").append(fqName.toString()).append(" "); } builder.append("name=").append(getName()); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetTypeParameterStubImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetTypeParameterStubImpl.java index 113d90785f0..d0beee0d463 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetTypeParameterStubImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetTypeParameterStubImpl.java @@ -19,9 +19,11 @@ package org.jetbrains.jet.lang.psi.stubs.impl; import com.intellij.psi.stubs.StubBase; import com.intellij.psi.stubs.StubElement; import com.intellij.util.io.StringRef; +import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetTypeParameter; import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeParameterStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetTypeParameterElementType; +import org.jetbrains.jet.lang.resolve.name.FqName; public class PsiJetTypeParameterStubImpl extends StubBase implements PsiJetTypeParameterStub { private final StringRef name; @@ -84,4 +86,11 @@ public class PsiJetTypeParameterStubImpl extends StubBase impl return builder.toString(); } + + @Nullable + @Override + public FqName getFqName() { + // type parameters doesn't have FqNames + return null; + } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java b/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java index b946f7d631e..a8f121dfadd 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java @@ -120,7 +120,7 @@ public class StubIndexServiceImpl implements StubIndexService { sink.occurrence(JetTopLevelExtensionFunctionShortNameIndex.getInstance().getKey(), name); } - FqName topFQName = stub.getTopFQName(); + FqName topFQName = stub.getFqName(); if (topFQName != null) { sink.occurrence(JetTopLevelFunctionsFqnNameIndex.getInstance().getKey(), topFQName.asString()); } @@ -135,7 +135,7 @@ public class StubIndexServiceImpl implements StubIndexService { String propertyName = stub.getName(); if (propertyName != null) { if (stub.isTopLevel()) { - FqName topFQName = stub.getTopFQName(); + FqName topFQName = stub.getFqName(); if (topFQName != null) { sink.occurrence(JetTopLevelPropertiesFqnNameIndex.getInstance().getKey(), topFQName.asString()); } diff --git a/idea/tests/org/jetbrains/jet/plugin/stubs/JetStubsTest.java b/idea/tests/org/jetbrains/jet/plugin/stubs/JetStubsTest.java index ef09f6a7a9b..6ca8238bebc 100644 --- a/idea/tests/org/jetbrains/jet/plugin/stubs/JetStubsTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/stubs/JetStubsTest.java @@ -92,7 +92,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testFunctionParameters() { doBuildTest("fun some(t: Int, other: String = \"hello\") { }", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=some name=some]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=some name=some]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n" + " VALUE_PARAMETER:PsiJetParameterStubImpl[val name=t typeText=Int defaultValue=null]\n" + " VALUE_PARAMETER:PsiJetParameterStubImpl[val name=other typeText=String defaultValue=\"hello\"]\n"); @@ -102,7 +102,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { doBuildTest("package test.testing\n" + "val some = 12", "PsiJetFileStubImpl[package=test.testing]\n" + - " PROPERTY:PsiJetPropertyStubImpl[val top topFQName=test.testing.some name=some typeText=null bodyText=12]\n"); + " PROPERTY:PsiJetPropertyStubImpl[val top fqName=test.testing.some name=some typeText=null bodyText=12]\n"); } public void testClassProperty() { @@ -117,14 +117,14 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testNotStorePropertyFromInitializer() { doBuildTest("fun DoubleArray.some() = for (element in this) println(element)", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=some ext name=some]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=some ext name=some]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n"); } public void testNotStorePropertyFromDelegate() { doBuildTest("val a by kotlin.\n val b = 1", "PsiJetFileStubImpl[package=]\n" + - " PROPERTY:PsiJetPropertyStubImpl[val top topFQName=a name=a typeText=null bodyText=null]\n"); + " PROPERTY:PsiJetPropertyStubImpl[val top fqName=a name=a typeText=null bodyText=null]\n"); } public void testNotStorePropertiesFrom() { @@ -172,7 +172,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { "PsiJetFileStubImpl[package=]\n" + " CLASS:PsiJetClassStubImpl[name=A fqn=A superNames=[]]\n" + " CLASS:PsiJetClassStubImpl[trait name=T fqn=T superNames=[]]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n" + " CLASS:PsiJetClassStubImpl[local name=Test fqn=null superNames=[AT]]\n"); } @@ -182,7 +182,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { "PsiJetFileStubImpl[package=]\n" + " CLASS:PsiJetClassStubImpl[name=A fqn=A superNames=[]]\n" + " CLASS:PsiJetClassStubImpl[trait name=T fqn=T superNames=[]]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n" + " CLASS:PsiJetClassStubImpl[local name=Test fqn=null superNames=[AT]]\n"); } @@ -200,7 +200,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { "PsiJetFileStubImpl[package=]\n" + " CLASS:PsiJetClassStubImpl[name=A fqn=A superNames=[]]\n" + " CLASS:PsiJetClassStubImpl[trait name=T fqn=T superNames=[]]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n" + " OBJECT_DECLARATION:PsiJetObjectStubImpl[local name=O fqName=null superNames=[AT]]\n"); } @@ -210,7 +210,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { "PsiJetFileStubImpl[package=]\n" + " CLASS:PsiJetClassStubImpl[name=A fqn=A superNames=[]]\n" + " CLASS:PsiJetClassStubImpl[trait name=T fqn=T superNames=[]]\n" + - " PROPERTY:PsiJetPropertyStubImpl[val top topFQName=obj name=obj typeText=null bodyText=object : A(), T]\n" + + " PROPERTY:PsiJetPropertyStubImpl[val top fqName=obj name=obj typeText=null bodyText=object : A(), T]\n" + " OBJECT_DECLARATION:PsiJetObjectStubImpl[local name=null fqName=null superNames=[AT]]\n"); } @@ -224,7 +224,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testAnnotationOnFunction() { doBuildTest("Deprecated fun foo() {}", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " ANNOTATION_ENTRY:PsiJetAnnotationStubImpl[shortName=Deprecated]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n"); } @@ -232,7 +232,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testQualifiedAnnotationOnFunction() { doBuildTest("java.lang.Deprecated fun foo() {}", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " ANNOTATION_ENTRY:PsiJetAnnotationStubImpl[shortName=Deprecated]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n"); } @@ -240,7 +240,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testManyAnnotationsOnFunction() { doBuildTest("[Deprecated Override] fun foo() {}", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " ANNOTATION_ENTRY:PsiJetAnnotationStubImpl[shortName=Deprecated]\n" + " ANNOTATION_ENTRY:PsiJetAnnotationStubImpl[shortName=Override]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n"); @@ -249,7 +249,7 @@ public class JetStubsTest extends LightCodeInsightFixtureTestCase { public void testAnnotationOnLocalFunction() { doBuildTest("fun foo() { [Deprecated] fun innerFoo() {} }", "PsiJetFileStubImpl[package=]\n" + - " FUN:PsiJetFunctionStubImpl[top topFQName=foo name=foo]\n" + + " FUN:PsiJetFunctionStubImpl[top fqName=foo name=foo]\n" + " VALUE_PARAMETER_LIST:PsiJetParameterListStubImpl\n"); }