Rename stub classes: PsiJet*Stub(Impl) -> Kotlin*Stub(Impl)
This commit is contained in:
@@ -18,18 +18,18 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetAnnotation extends JetElementImplStub<PsiJetPlaceHolderStub<JetAnnotation>> {
|
public class JetAnnotation extends JetElementImplStub<KotlinPlaceHolderStub<JetAnnotation>> {
|
||||||
|
|
||||||
public JetAnnotation(@NotNull ASTNode node) {
|
public JetAnnotation(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetAnnotation(PsiJetPlaceHolderStub<JetAnnotation> stub) {
|
public JetAnnotation(KotlinPlaceHolderStub<JetAnnotation> stub) {
|
||||||
super(stub, JetStubElementTypes.ANNOTATION);
|
super(stub, JetStubElementTypes.ANNOTATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,18 +20,18 @@ import com.intellij.lang.ASTNode;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinAnnotationEntryStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetAnnotationEntry extends JetElementImplStub<PsiJetAnnotationEntryStub> implements JetCallElement {
|
public class JetAnnotationEntry extends JetElementImplStub<KotlinAnnotationEntryStub> implements JetCallElement {
|
||||||
public JetAnnotationEntry(@NotNull ASTNode node) {
|
public JetAnnotationEntry(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetAnnotationEntry(@NotNull PsiJetAnnotationEntryStub stub) {
|
public JetAnnotationEntry(@NotNull KotlinAnnotationEntryStub stub) {
|
||||||
super(stub, JetStubElementTypes.ANNOTATION_ENTRY);
|
super(stub, JetStubElementTypes.ANNOTATION_ENTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class JetAnnotationEntry extends JetElementImplStub<PsiJetAnnotationEntry
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JetValueArgumentList getValueArgumentList() {
|
public JetValueArgumentList getValueArgumentList() {
|
||||||
PsiJetAnnotationEntryStub stub = getStub();
|
KotlinAnnotationEntryStub stub = getStub();
|
||||||
if (stub != null && !stub.hasValueArguments()) {
|
if (stub != null && !stub.hasValueArguments()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.addRemoveModifier.AddRemoveModifierPackage;
|
import org.jetbrains.jet.lang.psi.addRemoveModifier.AddRemoveModifierPackage;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||||
@@ -38,13 +38,13 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetClass extends JetTypeParameterListOwnerStub<PsiJetClassStub> implements JetClassOrObject {
|
public class JetClass extends JetTypeParameterListOwnerStub<KotlinClassStub> implements JetClassOrObject {
|
||||||
|
|
||||||
public JetClass(@NotNull ASTNode node) {
|
public JetClass(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetClass(@NotNull PsiJetClassStub stub) {
|
public JetClass(@NotNull KotlinClassStub stub) {
|
||||||
super(stub, JetStubElementTypes.CLASS);
|
super(stub, JetStubElementTypes.CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ public class JetClass extends JetTypeParameterListOwnerStub<PsiJetClassStub> imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTrait() {
|
public boolean isTrait() {
|
||||||
PsiJetClassStub stub = getStub();
|
KotlinClassStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isTrait();
|
return stub.isTrait();
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ public class JetClass extends JetTypeParameterListOwnerStub<PsiJetClassStub> imp
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String getQualifiedName() {
|
private String getQualifiedName() {
|
||||||
PsiJetClassStub stub = getStub();
|
KotlinClassStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
FqName fqName = stub.getFqName();
|
FqName fqName = stub.getFqName();
|
||||||
return fqName == null ? null : fqName.asString();
|
return fqName == null ? null : fqName.asString();
|
||||||
@@ -230,7 +230,7 @@ public class JetClass extends JetTypeParameterListOwnerStub<PsiJetClassStub> imp
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isLocal() {
|
public boolean isLocal() {
|
||||||
PsiJetClassStub stub = getStub();
|
KotlinClassStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isLocal();
|
return stub.isLocal();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.intellij.psi.tree.TokenSet;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
@@ -31,13 +31,13 @@ import java.util.List;
|
|||||||
|
|
||||||
import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.*;
|
import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.*;
|
||||||
|
|
||||||
public class JetClassBody extends JetElementImplStub<PsiJetPlaceHolderStub<JetClassBody>> implements JetDeclarationContainer {
|
public class JetClassBody extends JetElementImplStub<KotlinPlaceHolderStub<JetClassBody>> implements JetDeclarationContainer {
|
||||||
|
|
||||||
public JetClassBody(@NotNull ASTNode node) {
|
public JetClassBody(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetClassBody(@NotNull PsiJetPlaceHolderStub<JetClassBody> stub) {
|
public JetClassBody(@NotNull KotlinPlaceHolderStub<JetClassBody> stub) {
|
||||||
super(stub, CLASS_BODY);
|
super(stub, CLASS_BODY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetClassInitializer extends JetDeclarationStub<PsiJetPlaceHolderStub<JetClassInitializer>> implements JetStatementExpression {
|
public class JetClassInitializer extends JetDeclarationStub<KotlinPlaceHolderStub<JetClassInitializer>> implements JetStatementExpression {
|
||||||
public JetClassInitializer(@NotNull ASTNode node) {
|
public JetClassInitializer(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetClassInitializer(@NotNull PsiJetPlaceHolderStub<JetClassInitializer> stub) {
|
public JetClassInitializer(@NotNull KotlinPlaceHolderStub<JetClassInitializer> stub) {
|
||||||
super(stub, JetStubElementTypes.ANONYMOUS_INITIALIZER);
|
super(stub, JetStubElementTypes.ANONYMOUS_INITIALIZER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
public class JetClassObject extends JetDeclarationStub<PsiJetPlaceHolderStub<JetClassObject>> implements JetStatementExpression {
|
public class JetClassObject extends JetDeclarationStub<KotlinPlaceHolderStub<JetClassObject>> implements JetStatementExpression {
|
||||||
public JetClassObject(@NotNull ASTNode node) {
|
public JetClassObject(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetClassObject(@NotNull PsiJetPlaceHolderStub<JetClassObject> stub) {
|
public JetClassObject(@NotNull KotlinPlaceHolderStub<JetClassObject> stub) {
|
||||||
super(stub, JetStubElementTypes.CLASS_OBJECT);
|
super(stub, JetStubElementTypes.CLASS_OBJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -19,15 +19,15 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetConstructorCalleeExpression extends JetExpressionImplStub<PsiJetPlaceHolderStub<JetConstructorCalleeExpression>> {
|
public class JetConstructorCalleeExpression extends JetExpressionImplStub<KotlinPlaceHolderStub<JetConstructorCalleeExpression>> {
|
||||||
public JetConstructorCalleeExpression(@NotNull ASTNode node) {
|
public JetConstructorCalleeExpression(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetConstructorCalleeExpression(@NotNull PsiJetPlaceHolderStub<JetConstructorCalleeExpression> stub) {
|
public JetConstructorCalleeExpression(@NotNull KotlinPlaceHolderStub<JetConstructorCalleeExpression> stub) {
|
||||||
super(stub, JetStubElementTypes.CONSTRUCTOR_CALLEE);
|
super(stub, JetStubElementTypes.CONSTRUCTOR_CALLEE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinModifierListStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetDeclarationModifierList extends JetModifierList {
|
public class JetDeclarationModifierList extends JetModifierList {
|
||||||
@@ -26,7 +26,7 @@ public class JetDeclarationModifierList extends JetModifierList {
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDeclarationModifierList(@NotNull PsiJetModifierListStub stub) {
|
public JetDeclarationModifierList(@NotNull KotlinModifierListStub stub) {
|
||||||
super(stub, JetStubElementTypes.MODIFIER_LIST);
|
super(stub, JetStubElementTypes.MODIFIER_LIST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import com.intellij.psi.stubs.IStubElementType;
|
|||||||
import com.intellij.util.ArrayFactory;
|
import com.intellij.util.ArrayFactory;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetDelegationSpecifier extends JetElementImplStub<PsiJetPlaceHolderStub<? extends JetDelegationSpecifier>> {
|
public class JetDelegationSpecifier extends JetElementImplStub<KotlinPlaceHolderStub<? extends JetDelegationSpecifier>> {
|
||||||
|
|
||||||
private static final JetDelegationSpecifier[] EMPTY_ARRAY = new JetDelegationSpecifier[0];
|
private static final JetDelegationSpecifier[] EMPTY_ARRAY = new JetDelegationSpecifier[0];
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class JetDelegationSpecifier extends JetElementImplStub<PsiJetPlaceHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegationSpecifier(
|
public JetDelegationSpecifier(
|
||||||
@NotNull PsiJetPlaceHolderStub<? extends JetDelegationSpecifier> stub,
|
@NotNull KotlinPlaceHolderStub<? extends JetDelegationSpecifier> stub,
|
||||||
@NotNull IStubElementType nodeType) {
|
@NotNull IStubElementType nodeType) {
|
||||||
super(stub, nodeType);
|
super(stub, nodeType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetDelegationSpecifierList extends JetElementImplStub<PsiJetPlaceHolderStub<JetDelegationSpecifierList>> {
|
public class JetDelegationSpecifierList extends JetElementImplStub<KotlinPlaceHolderStub<JetDelegationSpecifierList>> {
|
||||||
public JetDelegationSpecifierList(@NotNull ASTNode node) {
|
public JetDelegationSpecifierList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegationSpecifierList(@NotNull PsiJetPlaceHolderStub<JetDelegationSpecifierList> stub) {
|
public JetDelegationSpecifierList(@NotNull KotlinPlaceHolderStub<JetDelegationSpecifierList> stub) {
|
||||||
super(stub, JetStubElementTypes.DELEGATION_SPECIFIER_LIST);
|
super(stub, JetStubElementTypes.DELEGATION_SPECIFIER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetDelegatorByExpressionSpecifier extends JetDelegationSpecifier {
|
public class JetDelegatorByExpressionSpecifier extends JetDelegationSpecifier {
|
||||||
@@ -27,7 +27,7 @@ public class JetDelegatorByExpressionSpecifier extends JetDelegationSpecifier {
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegatorByExpressionSpecifier(@NotNull PsiJetPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
public JetDelegatorByExpressionSpecifier(@NotNull KotlinPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
||||||
super(stub, JetStubElementTypes.DELEGATOR_BY);
|
super(stub, JetStubElementTypes.DELEGATOR_BY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.intellij.lang.ASTNode;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -31,7 +31,7 @@ public class JetDelegatorToSuperCall extends JetDelegationSpecifier implements J
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegatorToSuperCall(@NotNull PsiJetPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
public JetDelegatorToSuperCall(@NotNull KotlinPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
||||||
super(stub, JetStubElementTypes.DELEGATOR_SUPER_CALL);
|
super(stub, JetStubElementTypes.DELEGATOR_SUPER_CALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetDelegatorToSuperClass extends JetDelegationSpecifier {
|
public class JetDelegatorToSuperClass extends JetDelegationSpecifier {
|
||||||
@@ -26,7 +26,7 @@ public class JetDelegatorToSuperClass extends JetDelegationSpecifier {
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegatorToSuperClass(@NotNull PsiJetPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
public JetDelegatorToSuperClass(@NotNull KotlinPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
||||||
super(stub, JetStubElementTypes.DELEGATOR_SUPER_CLASS);
|
super(stub, JetStubElementTypes.DELEGATOR_SUPER_CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.intellij.lang.ASTNode;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -32,7 +32,7 @@ public class JetDelegatorToThisCall extends JetDelegationSpecifier implements Je
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDelegatorToThisCall(@NotNull PsiJetPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
public JetDelegatorToThisCall(@NotNull KotlinPlaceHolderStub<? extends JetDelegationSpecifier> stub) {
|
||||||
super(stub, JetStubElementTypes.THIS_CALL);
|
super(stub, JetStubElementTypes.THIS_CALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetToken;
|
import org.jetbrains.jet.lexer.JetToken;
|
||||||
|
|
||||||
import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.INSIDE_DIRECTIVE_EXPRESSIONS;
|
import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.INSIDE_DIRECTIVE_EXPRESSIONS;
|
||||||
|
|
||||||
public class JetDotQualifiedExpression extends JetExpressionImplStub<PsiJetPlaceHolderStub<JetDotQualifiedExpression>>
|
public class JetDotQualifiedExpression extends JetExpressionImplStub<KotlinPlaceHolderStub<JetDotQualifiedExpression>>
|
||||||
implements JetQualifiedExpression {
|
implements JetQualifiedExpression {
|
||||||
|
|
||||||
private static final Logger LOG = Logger.getInstance(JetDotQualifiedExpression.class);
|
private static final Logger LOG = Logger.getInstance(JetDotQualifiedExpression.class);
|
||||||
@@ -35,7 +35,7 @@ public class JetDotQualifiedExpression extends JetExpressionImplStub<PsiJetPlace
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetDotQualifiedExpression(@NotNull PsiJetPlaceHolderStub<JetDotQualifiedExpression> stub) {
|
public JetDotQualifiedExpression(@NotNull KotlinPlaceHolderStub<JetDotQualifiedExpression> stub) {
|
||||||
super(stub, JetStubElementTypes.DOT_QUALIFIED_EXPRESSION);
|
super(stub, JetStubElementTypes.DOT_QUALIFIED_EXPRESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public class JetDotQualifiedExpression extends JetExpressionImplStub<PsiJetPlace
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public JetExpression getReceiverExpression() {
|
public JetExpression getReceiverExpression() {
|
||||||
PsiJetPlaceHolderStub<JetDotQualifiedExpression> stub = getStub();
|
KotlinPlaceHolderStub<JetDotQualifiedExpression> stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
JetExpression[] childExpressionsByStub = getChildExpressionsByStub(stub);
|
JetExpression[] childExpressionsByStub = getChildExpressionsByStub(stub);
|
||||||
if (childExpressionsByStub != null) {
|
if (childExpressionsByStub != null) {
|
||||||
@@ -60,7 +60,7 @@ public class JetDotQualifiedExpression extends JetExpressionImplStub<PsiJetPlace
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public JetExpression getSelectorExpression() {
|
public JetExpression getSelectorExpression() {
|
||||||
PsiJetPlaceHolderStub<JetDotQualifiedExpression> stub = getStub();
|
KotlinPlaceHolderStub<JetDotQualifiedExpression> stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
JetExpression[] childExpressionsByStub = getChildExpressionsByStub(stub);
|
JetExpression[] childExpressionsByStub = getChildExpressionsByStub(stub);
|
||||||
if (childExpressionsByStub != null && childExpressionsByStub.length == 2) {
|
if (childExpressionsByStub != null && childExpressionsByStub.length == 2) {
|
||||||
@@ -72,7 +72,7 @@ public class JetDotQualifiedExpression extends JetExpressionImplStub<PsiJetPlace
|
|||||||
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private JetExpression[] getChildExpressionsByStub(@NotNull PsiJetPlaceHolderStub<JetDotQualifiedExpression> stub) {
|
private JetExpression[] getChildExpressionsByStub(@NotNull KotlinPlaceHolderStub<JetDotQualifiedExpression> stub) {
|
||||||
if (stub.getParentStubOfType(JetImportDirective.class) == null && stub.getParentStubOfType(JetPackageDirective.class) == null) {
|
if (stub.getParentStubOfType(JetImportDirective.class) == null && stub.getParentStubOfType(JetPackageDirective.class) == null) {
|
||||||
LOG.error("JetDotQualifiedExpression should only have stubs inside import or package directives.\n " +
|
LOG.error("JetDotQualifiedExpression should only have stubs inside import or package directives.\n " +
|
||||||
"Stubs were created for:\n " + getText() +
|
"Stubs were created for:\n " + getText() +
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.intellij.util.IncorrectOperationException;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -33,13 +33,13 @@ public class JetEnumEntry extends JetClass {
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetEnumEntry(@NotNull PsiJetClassStub stub) {
|
public JetEnumEntry(@NotNull KotlinClassStub stub) {
|
||||||
super(stub);
|
super(stub);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
PsiJetClassStub classStub = getStub();
|
KotlinClassStub classStub = getStub();
|
||||||
if (classStub != null) {
|
if (classStub != null) {
|
||||||
return classStub.getName();
|
return classStub.getName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import com.intellij.psi.util.PsiTreeUtil;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFileStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFileStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetPlaceHolderStubElementType;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetPlaceHolderStubElementType;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
@@ -72,7 +72,7 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public List<JetDeclaration> getDeclarations() {
|
public List<JetDeclaration> getDeclarations() {
|
||||||
PsiJetFileStub stub = getStub();
|
KotlinFileStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return Arrays.asList(stub.getChildrenByType(JetStubElementTypes.DECLARATION_TYPES, JetDeclaration.ARRAY_FACTORY));
|
return Arrays.asList(stub.getChildrenByType(JetStubElementTypes.DECLARATION_TYPES, JetDeclaration.ARRAY_FACTORY));
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
@NotNull JetPlaceHolderStubElementType<T> elementType,
|
@NotNull JetPlaceHolderStubElementType<T> elementType,
|
||||||
@NotNull Class<T> elementClass
|
@NotNull Class<T> elementClass
|
||||||
) {
|
) {
|
||||||
PsiJetFileStub stub = getStub();
|
KotlinFileStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
StubElement<T> importListStub = stub.findChildStubByType(elementType);
|
StubElement<T> importListStub = stub.findChildStubByType(elementType);
|
||||||
return importListStub != null ? importListStub.getPsi() : null;
|
return importListStub != null ? importListStub.getPsi() : null;
|
||||||
@@ -121,7 +121,7 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
// scripts have no package directive, all other files must have package directives
|
// scripts have no package directive, all other files must have package directives
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetPackageDirective getPackageDirective() {
|
public JetPackageDirective getPackageDirective() {
|
||||||
PsiJetFileStub stub = getStub();
|
KotlinFileStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
StubElement<JetPackageDirective> packageDirectiveStub = stub.findChildStubByType(JetStubElementTypes.PACKAGE_DIRECTIVE);
|
StubElement<JetPackageDirective> packageDirectiveStub = stub.findChildStubByType(JetStubElementTypes.PACKAGE_DIRECTIVE);
|
||||||
return packageDirectiveStub != null ? packageDirectiveStub.getPsi() : null;
|
return packageDirectiveStub != null ? packageDirectiveStub.getPsi() : null;
|
||||||
@@ -139,7 +139,7 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public FqName getPackageFqName() {
|
public FqName getPackageFqName() {
|
||||||
PsiJetFileStub stub = getStub();
|
KotlinFileStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.getPackageFqName();
|
return stub.getPackageFqName();
|
||||||
}
|
}
|
||||||
@@ -157,8 +157,8 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public PsiJetFileStub getStub() {
|
public KotlinFileStub getStub() {
|
||||||
return (PsiJetFileStub) super.getStub();
|
return (KotlinFileStub) super.getStub();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -177,7 +177,7 @@ public class JetFile extends PsiFileBase implements JetDeclarationContainer, Jet
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isScript() {
|
public boolean isScript() {
|
||||||
PsiJetFileStub stub = getStub();
|
KotlinFileStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isScript();
|
return stub.isScript();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,18 +20,18 @@ import com.intellij.lang.ASTNode;
|
|||||||
import kotlin.Function1;
|
import kotlin.Function1;
|
||||||
import kotlin.KotlinPackage;
|
import kotlin.KotlinPackage;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetFileAnnotationList extends JetElementImplStub<PsiJetPlaceHolderStub<JetFileAnnotationList>> {
|
public class JetFileAnnotationList extends JetElementImplStub<KotlinPlaceHolderStub<JetFileAnnotationList>> {
|
||||||
|
|
||||||
public JetFileAnnotationList(@NotNull ASTNode node) {
|
public JetFileAnnotationList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetFileAnnotationList(@NotNull PsiJetPlaceHolderStub<JetFileAnnotationList> stub) {
|
public JetFileAnnotationList(@NotNull KotlinPlaceHolderStub<JetFileAnnotationList> stub) {
|
||||||
super(stub, JetStubElementTypes.FILE_ANNOTATION_LIST);
|
super(stub, JetStubElementTypes.FILE_ANNOTATION_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetToken;
|
import org.jetbrains.jet.lexer.JetToken;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
@@ -29,7 +29,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetFunctionType extends JetElementImplStub<PsiJetPlaceHolderStub<JetFunctionType>> implements JetTypeElement {
|
public class JetFunctionType extends JetElementImplStub<KotlinPlaceHolderStub<JetFunctionType>> implements JetTypeElement {
|
||||||
|
|
||||||
public static final JetToken RETURN_TYPE_SEPARATOR = JetTokens.ARROW;
|
public static final JetToken RETURN_TYPE_SEPARATOR = JetTokens.ARROW;
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ public class JetFunctionType extends JetElementImplStub<PsiJetPlaceHolderStub<Je
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetFunctionType(@NotNull PsiJetPlaceHolderStub<JetFunctionType> stub) {
|
public JetFunctionType(@NotNull KotlinPlaceHolderStub<JetFunctionType> stub) {
|
||||||
super(stub, JetStubElementTypes.FUNCTION_TYPE);
|
super(stub, JetStubElementTypes.FUNCTION_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetFunctionTypeReceiver extends JetElementImplStub<PsiJetPlaceHolderStub<JetFunctionTypeReceiver>> {
|
public class JetFunctionTypeReceiver extends JetElementImplStub<KotlinPlaceHolderStub<JetFunctionTypeReceiver>> {
|
||||||
public JetFunctionTypeReceiver(@NotNull ASTNode node) {
|
public JetFunctionTypeReceiver(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetFunctionTypeReceiver(@NotNull PsiJetPlaceHolderStub<JetFunctionTypeReceiver> stub) {
|
public JetFunctionTypeReceiver(@NotNull KotlinPlaceHolderStub<JetFunctionTypeReceiver> stub) {
|
||||||
super(stub, JetStubElementTypes.FUNCTION_TYPE_RECEIVER);
|
super(stub, JetStubElementTypes.FUNCTION_TYPE_RECEIVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,20 +21,20 @@ import com.intellij.psi.tree.IElementType;
|
|||||||
import com.intellij.psi.util.PsiTreeUtil;
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetImportDirectiveStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinImportDirectiveStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.ImportPath;
|
import org.jetbrains.jet.lang.resolve.ImportPath;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
public class JetImportDirective extends JetElementImplStub<PsiJetImportDirectiveStub> {
|
public class JetImportDirective extends JetElementImplStub<KotlinImportDirectiveStub> {
|
||||||
|
|
||||||
public JetImportDirective(@NotNull ASTNode node) {
|
public JetImportDirective(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetImportDirective(@NotNull PsiJetImportDirectiveStub stub) {
|
public JetImportDirective(@NotNull KotlinImportDirectiveStub stub) {
|
||||||
super(stub, JetStubElementTypes.IMPORT_DIRECTIVE);
|
super(stub, JetStubElementTypes.IMPORT_DIRECTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ public class JetImportDirective extends JetElementImplStub<PsiJetImportDirective
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAbsoluteInRootPackage() {
|
public boolean isAbsoluteInRootPackage() {
|
||||||
PsiJetImportDirectiveStub stub = getStub();
|
KotlinImportDirectiveStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isAbsoluteInRootPackage();
|
return stub.isAbsoluteInRootPackage();
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ public class JetImportDirective extends JetElementImplStub<PsiJetImportDirective
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getAliasName() {
|
public String getAliasName() {
|
||||||
PsiJetImportDirectiveStub stub = getStub();
|
KotlinImportDirectiveStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.getAliasName();
|
return stub.getAliasName();
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ public class JetImportDirective extends JetElementImplStub<PsiJetImportDirective
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAllUnder() {
|
public boolean isAllUnder() {
|
||||||
PsiJetImportDirectiveStub stub = getStub();
|
KotlinImportDirectiveStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isAllUnder();
|
return stub.isAllUnder();
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ public class JetImportDirective extends JetElementImplStub<PsiJetImportDirective
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValidImport() {
|
public boolean isValidImport() {
|
||||||
PsiJetImportDirectiveStub stub = getStub();
|
KotlinImportDirectiveStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isValid();
|
return stub.isValid();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetImportList extends JetElementImplStub<PsiJetPlaceHolderStub<JetImportList>> {
|
public class JetImportList extends JetElementImplStub<KotlinPlaceHolderStub<JetImportList>> {
|
||||||
|
|
||||||
public JetImportList(@NotNull ASTNode node) {
|
public JetImportList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetImportList(@NotNull PsiJetPlaceHolderStub<JetImportList> stub) {
|
public JetImportList(@NotNull KotlinPlaceHolderStub<JetImportList> stub) {
|
||||||
super(stub, JetStubElementTypes.IMPORT_LIST);
|
super(stub, JetStubElementTypes.IMPORT_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,21 +17,19 @@
|
|||||||
package org.jetbrains.jet.lang.psi;
|
package org.jetbrains.jet.lang.psi;
|
||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import com.intellij.psi.stubs.IStubElementType;
|
|
||||||
import com.intellij.psi.util.PsiTreeUtil;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetInitializerList extends JetElementImplStub<PsiJetPlaceHolderStub<JetInitializerList>> {
|
public class JetInitializerList extends JetElementImplStub<KotlinPlaceHolderStub<JetInitializerList>> {
|
||||||
public JetInitializerList(@NotNull ASTNode node) {
|
public JetInitializerList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetInitializerList(@NotNull PsiJetPlaceHolderStub<JetInitializerList> stub) {
|
public JetInitializerList(@NotNull KotlinPlaceHolderStub<JetInitializerList> stub) {
|
||||||
super(stub, JetStubElementTypes.INITIALIZER_LIST);
|
super(stub, JetStubElementTypes.INITIALIZER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.intellij.psi.PsiElement;
|
|||||||
import com.intellij.psi.stubs.IStubElementType;
|
import com.intellij.psi.stubs.IStubElementType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinModifierListStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||||
import org.jetbrains.jet.lexer.JetToken;
|
import org.jetbrains.jet.lexer.JetToken;
|
||||||
@@ -31,9 +31,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class JetModifierList extends JetElementImplStub<PsiJetModifierListStub> {
|
public abstract class JetModifierList extends JetElementImplStub<KotlinModifierListStub> {
|
||||||
|
|
||||||
public JetModifierList(@NotNull PsiJetModifierListStub stub, @NotNull IStubElementType nodeType) {
|
public JetModifierList(@NotNull KotlinModifierListStub stub, @NotNull IStubElementType nodeType) {
|
||||||
super(stub, nodeType);
|
super(stub, nodeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ public abstract class JetModifierList extends JetElementImplStub<PsiJetModifierL
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasModifier(@NotNull JetModifierKeywordToken token) {
|
public boolean hasModifier(@NotNull JetModifierKeywordToken token) {
|
||||||
PsiJetModifierListStub stub = getStub();
|
KotlinModifierListStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasModifier(token);
|
return stub.hasModifier(token);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ import com.intellij.psi.tree.IElementType;
|
|||||||
import com.intellij.psi.tree.TokenSet;
|
import com.intellij.psi.tree.TokenSet;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetNameReferenceExpressionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinNameReferenceExpressionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
import static org.jetbrains.jet.lexer.JetTokens.*;
|
import static org.jetbrains.jet.lexer.JetTokens.*;
|
||||||
|
|
||||||
public class JetNameReferenceExpression extends JetExpressionImplStub<PsiJetNameReferenceExpressionStub> implements JetSimpleNameExpression {
|
public class JetNameReferenceExpression extends JetExpressionImplStub<KotlinNameReferenceExpressionStub> implements JetSimpleNameExpression {
|
||||||
|
|
||||||
private static final TokenSet NAME_REFERENCE_EXPRESSIONS = TokenSet.create(IDENTIFIER, FIELD_IDENTIFIER, THIS_KEYWORD, SUPER_KEYWORD);
|
private static final TokenSet NAME_REFERENCE_EXPRESSIONS = TokenSet.create(IDENTIFIER, FIELD_IDENTIFIER, THIS_KEYWORD, SUPER_KEYWORD);
|
||||||
|
|
||||||
@@ -37,14 +37,14 @@ public class JetNameReferenceExpression extends JetExpressionImplStub<PsiJetName
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetNameReferenceExpression(@NotNull PsiJetNameReferenceExpressionStub stub) {
|
public JetNameReferenceExpression(@NotNull KotlinNameReferenceExpressionStub stub) {
|
||||||
super(stub, JetStubElementTypes.REFERENCE_EXPRESSION);
|
super(stub, JetStubElementTypes.REFERENCE_EXPRESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getReferencedName() {
|
public String getReferencedName() {
|
||||||
PsiJetNameReferenceExpressionStub stub = getStub();
|
KotlinNameReferenceExpressionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.getReferencedName();
|
return stub.getReferencedName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ import com.intellij.util.IncorrectOperationException;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetStubWithFqName;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinStubWithFqName;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
import static org.jetbrains.jet.lang.psi.PsiPackage.JetPsiFactory;
|
import static org.jetbrains.jet.lang.psi.PsiPackage.JetPsiFactory;
|
||||||
|
|
||||||
abstract class JetNamedDeclarationStub<T extends PsiJetStubWithFqName> extends JetDeclarationStub<T> implements JetNamedDeclaration {
|
abstract class JetNamedDeclarationStub<T extends KotlinStubWithFqName> extends JetDeclarationStub<T> implements JetNamedDeclaration {
|
||||||
public JetNamedDeclarationStub(@NotNull T stub, @NotNull IStubElementType nodeType) {
|
public JetNamedDeclarationStub(@NotNull T stub, @NotNull IStubElementType nodeType) {
|
||||||
super(stub, nodeType);
|
super(stub, nodeType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import com.intellij.psi.tree.IElementType;
|
|||||||
import com.intellij.psi.util.PsiTreeUtil;
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFunctionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
@@ -33,13 +33,13 @@ import org.jetbrains.jet.lexer.JetTokens;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFunctionStub>
|
public class JetNamedFunction extends JetTypeParameterListOwnerStub<KotlinFunctionStub>
|
||||||
implements JetFunction, JetWithExpressionInitializer, PsiModifiableCodeBlock {
|
implements JetFunction, JetWithExpressionInitializer, PsiModifiableCodeBlock {
|
||||||
public JetNamedFunction(@NotNull ASTNode node) {
|
public JetNamedFunction(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetNamedFunction(@NotNull PsiJetFunctionStub stub) {
|
public JetNamedFunction(@NotNull KotlinFunctionStub stub) {
|
||||||
super(stub, JetStubElementTypes.FUNCTION);
|
super(stub, JetStubElementTypes.FUNCTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasTypeParameterListBeforeFunctionName() {
|
public boolean hasTypeParameterListBeforeFunctionName() {
|
||||||
PsiJetFunctionStub stub = getStub();
|
KotlinFunctionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasTypeParameterListBeforeFunctionName();
|
return stub.hasTypeParameterListBeforeFunctionName();
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasBlockBody() {
|
public boolean hasBlockBody() {
|
||||||
PsiJetFunctionStub stub = getStub();
|
KotlinFunctionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasBlockBody();
|
return stub.hasBlockBody();
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasBody() {
|
public boolean hasBody() {
|
||||||
PsiJetFunctionStub stub = getStub();
|
KotlinFunctionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasBody();
|
return stub.hasBody();
|
||||||
}
|
}
|
||||||
@@ -134,7 +134,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetTypeReference getReceiverTypeReference() {
|
public JetTypeReference getReceiverTypeReference() {
|
||||||
PsiJetFunctionStub stub = getStub();
|
KotlinFunctionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
if (!stub.isExtension()) {
|
if (!stub.isExtension()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -168,7 +168,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetTypeReference getTypeReference() {
|
public JetTypeReference getTypeReference() {
|
||||||
PsiJetFunctionStub stub = getStub();
|
KotlinFunctionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
List<JetTypeReference> typeReferences = getStubOrPsiChildrenAsList(JetStubElementTypes.TYPE_REFERENCE);
|
List<JetTypeReference> typeReferences = getStubOrPsiChildrenAsList(JetStubElementTypes.TYPE_REFERENCE);
|
||||||
int returnTypeIndex = stub.isExtension() ? 1 : 0;
|
int returnTypeIndex = stub.isExtension() ? 1 : 0;
|
||||||
|
|||||||
@@ -19,19 +19,19 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetNullableType extends JetElementImplStub<PsiJetPlaceHolderStub<JetNullableType>> implements JetTypeElement {
|
public class JetNullableType extends JetElementImplStub<KotlinPlaceHolderStub<JetNullableType>> implements JetTypeElement {
|
||||||
public JetNullableType(@NotNull ASTNode node) {
|
public JetNullableType(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetNullableType(@NotNull PsiJetPlaceHolderStub<JetNullableType> stub) {
|
public JetNullableType(@NotNull KotlinPlaceHolderStub<JetNullableType> stub) {
|
||||||
super(stub, JetStubElementTypes.NULLABLE_TYPE);
|
super(stub, JetStubElementTypes.NULLABLE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.NonNls;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinObjectStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
@@ -33,18 +33,18 @@ import org.jetbrains.jet.lexer.JetTokens;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectStub> implements JetClassOrObject {
|
public class JetObjectDeclaration extends JetNamedDeclarationStub<KotlinObjectStub> implements JetClassOrObject {
|
||||||
public JetObjectDeclaration(@NotNull ASTNode node) {
|
public JetObjectDeclaration(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetObjectDeclaration(@NotNull PsiJetObjectStub stub) {
|
public JetObjectDeclaration(@NotNull KotlinObjectStub stub) {
|
||||||
super(stub, JetStubElementTypes.OBJECT_DECLARATION);
|
super(stub, JetStubElementTypes.OBJECT_DECLARATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
PsiJetObjectStub stub = getStub();
|
KotlinObjectStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.getName();
|
return stub.getName();
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectSt
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTopLevel() {
|
public boolean isTopLevel() {
|
||||||
PsiJetObjectStub stub = getStub();
|
KotlinObjectStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isTopLevel();
|
return stub.isTopLevel();
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isClassObject() {
|
public boolean isClassObject() {
|
||||||
PsiJetObjectStub stub = getStub();
|
KotlinObjectStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isClassObject();
|
return stub.isClassObject();
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectSt
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isLocal() {
|
public boolean isLocal() {
|
||||||
PsiJetObjectStub stub = getStub();
|
KotlinObjectStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isLocal();
|
return stub.isLocal();
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isObjectLiteral() {
|
public boolean isObjectLiteral() {
|
||||||
PsiJetObjectStub stub = getStub();
|
KotlinObjectStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isObjectLiteral();
|
return stub.isObjectLiteral();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.intellij.util.containers.ContainerUtil;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
@@ -31,14 +31,14 @@ import org.jetbrains.jet.lang.resolve.name.SpecialNames;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetPackageDirective extends JetModifierListOwnerStub<PsiJetPlaceHolderStub<JetPackageDirective>> implements JetReferenceExpression {
|
public class JetPackageDirective extends JetModifierListOwnerStub<KotlinPlaceHolderStub<JetPackageDirective>> implements JetReferenceExpression {
|
||||||
private String qualifiedNameCache = null;
|
private String qualifiedNameCache = null;
|
||||||
|
|
||||||
public JetPackageDirective(@NotNull ASTNode node) {
|
public JetPackageDirective(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetPackageDirective(@NotNull PsiJetPlaceHolderStub<JetPackageDirective> stub) {
|
public JetPackageDirective(@NotNull KotlinPlaceHolderStub<JetPackageDirective> stub) {
|
||||||
super(stub, JetStubElementTypes.PACKAGE_DIRECTIVE);
|
super(stub, JetStubElementTypes.PACKAGE_DIRECTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.intellij.navigation.ItemPresentationProviders;
|
|||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
@@ -30,13 +30,13 @@ import org.jetbrains.jet.lexer.JetTokens;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> implements JetCallableDeclaration {
|
public class JetParameter extends JetNamedDeclarationStub<KotlinParameterStub> implements JetCallableDeclaration {
|
||||||
|
|
||||||
public JetParameter(@NotNull ASTNode node) {
|
public JetParameter(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetParameter(@NotNull PsiJetParameterStub stub) {
|
public JetParameter(@NotNull KotlinParameterStub stub) {
|
||||||
super(stub, JetStubElementTypes.VALUE_PARAMETER);
|
super(stub, JetStubElementTypes.VALUE_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasDefaultValue() {
|
public boolean hasDefaultValue() {
|
||||||
PsiJetParameterStub stub = getStub();
|
KotlinParameterStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasDefaultValue();
|
return stub.hasDefaultValue();
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> i
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetExpression getDefaultValue() {
|
public JetExpression getDefaultValue() {
|
||||||
PsiJetParameterStub stub = getStub();
|
KotlinParameterStub stub = getStub();
|
||||||
if (stub != null && !stub.hasDefaultValue()) {
|
if (stub != null && !stub.hasDefaultValue()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMutable() {
|
public boolean isMutable() {
|
||||||
PsiJetParameterStub stub = getStub();
|
KotlinParameterStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isMutable();
|
return stub.isMutable();
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasValOrVarNode() {
|
public boolean hasValOrVarNode() {
|
||||||
PsiJetParameterStub stub = getStub();
|
KotlinParameterStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasValOrValNode();
|
return stub.hasValOrValNode();
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> i
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public ASTNode getValOrVarNode() {
|
public ASTNode getValOrVarNode() {
|
||||||
PsiJetParameterStub stub = getStub();
|
KotlinParameterStub stub = getStub();
|
||||||
if (stub != null && !stub.hasValOrValNode()) {
|
if (stub != null && !stub.hasValOrValNode()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetParameterList extends JetElementImplStub<PsiJetPlaceHolderStub<JetParameterList>> {
|
public class JetParameterList extends JetElementImplStub<KotlinPlaceHolderStub<JetParameterList>> {
|
||||||
public JetParameterList(@NotNull ASTNode node) {
|
public JetParameterList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetParameterList(@NotNull PsiJetPlaceHolderStub<JetParameterList> stub) {
|
public JetParameterList(@NotNull KotlinPlaceHolderStub<JetParameterList> stub) {
|
||||||
super(stub, JetStubElementTypes.VALUE_PARAMETER_LIST);
|
super(stub, JetStubElementTypes.VALUE_PARAMETER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinModifierListStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class JetPrimaryConstructorModifierList extends JetModifierList {
|
public class JetPrimaryConstructorModifierList extends JetModifierList {
|
||||||
@@ -26,7 +26,7 @@ public class JetPrimaryConstructorModifierList extends JetModifierList {
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetPrimaryConstructorModifierList(@NotNull PsiJetModifierListStub stub) {
|
public JetPrimaryConstructorModifierList(@NotNull KotlinModifierListStub stub) {
|
||||||
super(stub, JetStubElementTypes.PRIMARY_CONSTRUCTOR_MODIFIER_LIST);
|
super(stub, JetStubElementTypes.PRIMARY_CONSTRUCTOR_MODIFIER_LIST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import com.intellij.psi.util.PsiTreeUtil;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
@@ -38,7 +38,7 @@ import java.util.List;
|
|||||||
import static org.jetbrains.jet.JetNodeTypes.PROPERTY_DELEGATE;
|
import static org.jetbrains.jet.JetNodeTypes.PROPERTY_DELEGATE;
|
||||||
import static org.jetbrains.jet.lexer.JetTokens.*;
|
import static org.jetbrains.jet.lexer.JetTokens.*;
|
||||||
|
|
||||||
public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStub>
|
public class JetProperty extends JetTypeParameterListOwnerStub<KotlinPropertyStub>
|
||||||
implements JetVariableDeclaration, PsiModifiableCodeBlock {
|
implements JetVariableDeclaration, PsiModifiableCodeBlock {
|
||||||
|
|
||||||
private static final Logger LOG = Logger.getInstance(JetProperty.class);
|
private static final Logger LOG = Logger.getInstance(JetProperty.class);
|
||||||
@@ -47,7 +47,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetProperty(@NotNull PsiJetPropertyStub stub) {
|
public JetProperty(@NotNull KotlinPropertyStub stub) {
|
||||||
super(stub, JetStubElementTypes.PROPERTY);
|
super(stub, JetStubElementTypes.PROPERTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isVar() {
|
public boolean isVar() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isVar();
|
return stub.isVar();
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTopLevel() {
|
public boolean isTopLevel() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isTopLevel();
|
return stub.isTopLevel();
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetTypeReference getReceiverTypeReference() {
|
public JetTypeReference getReceiverTypeReference() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
if (!stub.hasReceiverTypeRef()) {
|
if (!stub.hasReceiverTypeRef()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -120,7 +120,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public JetTypeReference getTypeReference() {
|
public JetTypeReference getTypeReference() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
if (!stub.hasReturnTypeRef()) {
|
if (!stub.hasReturnTypeRef()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -174,7 +174,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasDelegate() {
|
public boolean hasDelegate() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasDelegate();
|
return stub.hasDelegate();
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasDelegateExpression() {
|
public boolean hasDelegateExpression() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasDelegateExpression();
|
return stub.hasDelegateExpression();
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasInitializer() {
|
public boolean hasInitializer() {
|
||||||
PsiJetPropertyStub stub = getStub();
|
KotlinPropertyStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasInitializer();
|
return stub.hasInitializer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,20 +21,20 @@ import com.intellij.psi.PsiElement;
|
|||||||
import com.intellij.psi.util.PsiTreeUtil;
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyAccessorStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyAccessorStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetPropertyAccessor extends JetDeclarationStub<PsiJetPropertyAccessorStub>
|
public class JetPropertyAccessor extends JetDeclarationStub<KotlinPropertyAccessorStub>
|
||||||
implements JetDeclarationWithBody, JetModifierListOwner, JetWithExpressionInitializer {
|
implements JetDeclarationWithBody, JetModifierListOwner, JetWithExpressionInitializer {
|
||||||
public JetPropertyAccessor(@NotNull ASTNode node) {
|
public JetPropertyAccessor(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetPropertyAccessor(@NotNull PsiJetPropertyAccessorStub stub) {
|
public JetPropertyAccessor(@NotNull KotlinPropertyAccessorStub stub) {
|
||||||
super(stub, JetStubElementTypes.PROPERTY_ACCESSOR);
|
super(stub, JetStubElementTypes.PROPERTY_ACCESSOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ public class JetPropertyAccessor extends JetDeclarationStub<PsiJetPropertyAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSetter() {
|
public boolean isSetter() {
|
||||||
PsiJetPropertyAccessorStub stub = getStub();
|
KotlinPropertyAccessorStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return !stub.isGetter();
|
return !stub.isGetter();
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ public class JetPropertyAccessor extends JetDeclarationStub<PsiJetPropertyAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isGetter() {
|
public boolean isGetter() {
|
||||||
PsiJetPropertyAccessorStub stub = getStub();
|
KotlinPropertyAccessorStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isGetter();
|
return stub.isGetter();
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ public class JetPropertyAccessor extends JetDeclarationStub<PsiJetPropertyAccess
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasBody() {
|
public boolean hasBody() {
|
||||||
PsiJetPropertyAccessorStub stub = getStub();
|
KotlinPropertyAccessorStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.hasBody();
|
return stub.hasBody();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetTypeArgumentList extends JetElementImplStub<PsiJetPlaceHolderStub<JetTypeArgumentList>> {
|
public class JetTypeArgumentList extends JetElementImplStub<KotlinPlaceHolderStub<JetTypeArgumentList>> {
|
||||||
public JetTypeArgumentList(@NotNull ASTNode node) {
|
public JetTypeArgumentList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeArgumentList(@NotNull PsiJetPlaceHolderStub<JetTypeArgumentList> stub) {
|
public JetTypeArgumentList(@NotNull KotlinPlaceHolderStub<JetTypeArgumentList> stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_ARGUMENT_LIST);
|
super(stub, JetStubElementTypes.TYPE_ARGUMENT_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,16 +19,16 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeConstraintStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
public class JetTypeConstraint extends JetElementImplStub<PsiJetTypeConstraintStub> {
|
public class JetTypeConstraint extends JetElementImplStub<KotlinTypeConstraintStub> {
|
||||||
public JetTypeConstraint(@NotNull ASTNode node) {
|
public JetTypeConstraint(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeConstraint(@NotNull PsiJetTypeConstraintStub stub) {
|
public JetTypeConstraint(@NotNull KotlinTypeConstraintStub stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_CONSTRAINT);
|
super(stub, JetStubElementTypes.TYPE_CONSTRAINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ public class JetTypeConstraint extends JetElementImplStub<PsiJetTypeConstraintSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isClassObjectConstraint() {
|
public boolean isClassObjectConstraint() {
|
||||||
PsiJetTypeConstraintStub stub = getStub();
|
KotlinTypeConstraintStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isClassObjectConstraint();
|
return stub.isClassObjectConstraint();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,18 +18,17 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetTypeConstraintList extends JetElementImplStub<PsiJetPlaceHolderStub<JetTypeConstraintList>> {
|
public class JetTypeConstraintList extends JetElementImplStub<KotlinPlaceHolderStub<JetTypeConstraintList>> {
|
||||||
public JetTypeConstraintList(@NotNull ASTNode node) {
|
public JetTypeConstraintList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeConstraintList(@NotNull PsiJetPlaceHolderStub<JetTypeConstraintList> stub) {
|
public JetTypeConstraintList(@NotNull KotlinPlaceHolderStub<JetTypeConstraintList> stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_CONSTRAINT_LIST);
|
super(stub, JetStubElementTypes.TYPE_CONSTRAINT_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,18 +19,18 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.types.Variance;
|
import org.jetbrains.jet.lang.types.Variance;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
public class JetTypeParameter extends JetNamedDeclarationStub<PsiJetTypeParameterStub> {
|
public class JetTypeParameter extends JetNamedDeclarationStub<KotlinTypeParameterStub> {
|
||||||
|
|
||||||
public JetTypeParameter(@NotNull ASTNode node) {
|
public JetTypeParameter(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeParameter(@NotNull PsiJetTypeParameterStub stub) {
|
public JetTypeParameter(@NotNull KotlinTypeParameterStub stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_PARAMETER);
|
super(stub, JetStubElementTypes.TYPE_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class JetTypeParameter extends JetNamedDeclarationStub<PsiJetTypeParamete
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public Variance getVariance() {
|
public Variance getVariance() {
|
||||||
PsiJetTypeParameterStub stub = getStub();
|
KotlinTypeParameterStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
if (stub.isOutVariance()) return Variance.OUT_VARIANCE;
|
if (stub.isOutVariance()) return Variance.OUT_VARIANCE;
|
||||||
if (stub.isInVariance()) return Variance.IN_VARIANCE;
|
if (stub.isInVariance()) return Variance.IN_VARIANCE;
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetTypeParameterList extends JetElementImplStub<PsiJetPlaceHolderStub<JetTypeParameterList>> {
|
public class JetTypeParameterList extends JetElementImplStub<KotlinPlaceHolderStub<JetTypeParameterList>> {
|
||||||
public JetTypeParameterList(@NotNull ASTNode node) {
|
public JetTypeParameterList(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeParameterList(@NotNull PsiJetPlaceHolderStub<JetTypeParameterList> stub) {
|
public JetTypeParameterList(@NotNull KotlinPlaceHolderStub<JetTypeParameterList> stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_PARAMETER_LIST);
|
super(stub, JetStubElementTypes.TYPE_PARAMETER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.psi.stubs.IStubElementType;
|
import com.intellij.psi.stubs.IStubElementType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetStubWithFqName;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinStubWithFqName;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
abstract class JetTypeParameterListOwnerStub<T extends PsiJetStubWithFqName> extends JetNamedDeclarationStub<T> implements JetTypeParameterListOwner {
|
abstract class JetTypeParameterListOwnerStub<T extends KotlinStubWithFqName> extends JetNamedDeclarationStub<T> implements JetTypeParameterListOwner {
|
||||||
public JetTypeParameterListOwnerStub(@NotNull T stub, @NotNull IStubElementType nodeType) {
|
public JetTypeParameterListOwnerStub(@NotNull T stub, @NotNull IStubElementType nodeType) {
|
||||||
super(stub, nodeType);
|
super(stub, nodeType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,23 +21,23 @@ import com.intellij.psi.PsiElement;
|
|||||||
import com.intellij.psi.tree.IElementType;
|
import com.intellij.psi.tree.IElementType;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeProjectionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeProjectionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
public class JetTypeProjection extends JetModifierListOwnerStub<PsiJetTypeProjectionStub> {
|
public class JetTypeProjection extends JetModifierListOwnerStub<KotlinTypeProjectionStub> {
|
||||||
|
|
||||||
public JetTypeProjection(@NotNull ASTNode node) {
|
public JetTypeProjection(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeProjection(@NotNull PsiJetTypeProjectionStub stub) {
|
public JetTypeProjection(@NotNull KotlinTypeProjectionStub stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_PROJECTION);
|
super(stub, JetStubElementTypes.TYPE_PROJECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public JetProjectionKind getProjectionKind() {
|
public JetProjectionKind getProjectionKind() {
|
||||||
PsiJetTypeProjectionStub stub = getStub();
|
KotlinTypeProjectionStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.getProjectionKind();
|
return stub.getProjectionKind();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -32,13 +32,13 @@ import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.ANNO
|
|||||||
* Type reference element.
|
* Type reference element.
|
||||||
* Underlying token is {@link org.jetbrains.jet.JetNodeTypes#TYPE_REFERENCE}
|
* Underlying token is {@link org.jetbrains.jet.JetNodeTypes#TYPE_REFERENCE}
|
||||||
*/
|
*/
|
||||||
public class JetTypeReference extends JetElementImplStub<PsiJetPlaceHolderStub<JetTypeReference>> {
|
public class JetTypeReference extends JetElementImplStub<KotlinPlaceHolderStub<JetTypeReference>> {
|
||||||
|
|
||||||
public JetTypeReference(@NotNull ASTNode node) {
|
public JetTypeReference(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetTypeReference(PsiJetPlaceHolderStub<JetTypeReference> stub) {
|
public JetTypeReference(KotlinPlaceHolderStub<JetTypeReference> stub) {
|
||||||
super(stub, JetStubElementTypes.TYPE_REFERENCE);
|
super(stub, JetStubElementTypes.TYPE_REFERENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,25 +20,24 @@ import com.google.common.collect.Lists;
|
|||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinUserTypeStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetUserTypeStub;
|
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetUserType extends JetElementImplStub<PsiJetUserTypeStub> implements JetTypeElement {
|
public class JetUserType extends JetElementImplStub<KotlinUserTypeStub> implements JetTypeElement {
|
||||||
public JetUserType(@NotNull ASTNode node) {
|
public JetUserType(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JetUserType(@NotNull PsiJetUserTypeStub stub) {
|
public JetUserType(@NotNull KotlinUserTypeStub stub) {
|
||||||
super(stub, JetStubElementTypes.USER_TYPE);
|
super(stub, JetStubElementTypes.USER_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAbsoluteInRootPackage() {
|
public boolean isAbsoluteInRootPackage() {
|
||||||
PsiJetUserTypeStub stub = getStub();
|
KotlinUserTypeStub stub = getStub();
|
||||||
if (stub != null) {
|
if (stub != null) {
|
||||||
return stub.isAbsoluteInRootPackage();
|
return stub.isAbsoluteInRootPackage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import com.intellij.psi.PsiParameter
|
|||||||
import com.intellij.psi.PsiPackage
|
import com.intellij.psi.PsiPackage
|
||||||
import com.intellij.psi.JavaDirectoryService
|
import com.intellij.psi.JavaDirectoryService
|
||||||
import com.intellij.psi.PsiDirectory
|
import com.intellij.psi.PsiDirectory
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassOrObjectStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassOrObjectStub
|
||||||
import org.jetbrains.jet.lang.types.expressions.OperatorConventions
|
import org.jetbrains.jet.lang.types.expressions.OperatorConventions
|
||||||
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils
|
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils
|
||||||
import com.intellij.psi.PsiWhiteSpace
|
import com.intellij.psi.PsiWhiteSpace
|
||||||
@@ -126,7 +126,7 @@ public fun JetElement.wrapInBlock(): JetBlockExpression {
|
|||||||
*
|
*
|
||||||
* @return the list of possible superclass names
|
* @return the list of possible superclass names
|
||||||
*/
|
*/
|
||||||
public fun <T: JetClassOrObject> StubBasedPsiElementBase<out PsiJetClassOrObjectStub<T>>.getSuperNames(): List<String> {
|
public fun <T: JetClassOrObject> StubBasedPsiElementBase<out KotlinClassOrObjectStub<T>>.getSuperNames(): List<String> {
|
||||||
fun addSuperName(result: MutableList<String>, referencedName: String): Unit {
|
fun addSuperName(result: MutableList<String>, referencedName: String): Unit {
|
||||||
result.add(referencedName)
|
result.add(referencedName)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
||||||
|
|
||||||
public interface PsiJetAnnotationEntryStub extends StubElement<JetAnnotationEntry> {
|
public interface KotlinAnnotationEntryStub extends StubElement<JetAnnotationEntry> {
|
||||||
@NotNull
|
@NotNull
|
||||||
String getShortName();
|
String getShortName();
|
||||||
|
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.jet.lang.psi.JetClassOrObject;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface PsiJetClassOrObjectStub<T extends JetClassOrObject> extends PsiJetStubWithFqName<T> {
|
public interface KotlinClassOrObjectStub<T extends JetClassOrObject> extends KotlinStubWithFqName<T> {
|
||||||
boolean isLocal();
|
boolean isLocal();
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
|
|
||||||
import org.jetbrains.jet.lang.psi.JetClass;
|
import org.jetbrains.jet.lang.psi.JetClass;
|
||||||
|
|
||||||
public interface PsiJetClassStub extends PsiJetClassOrObjectStub<JetClass> {
|
public interface KotlinClassStub extends KotlinClassOrObjectStub<JetClass> {
|
||||||
boolean isTrait();
|
boolean isTrait();
|
||||||
|
|
||||||
boolean isEnumEntry();
|
boolean isEnumEntry();
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.JetFile;
|
import org.jetbrains.jet.lang.psi.JetFile;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public interface PsiJetFileStub extends PsiFileStub<JetFile> {
|
public interface KotlinFileStub extends PsiFileStub<JetFile> {
|
||||||
@NotNull
|
@NotNull
|
||||||
FqName getPackageFqName();
|
FqName getPackageFqName();
|
||||||
boolean isScript();
|
boolean isScript();
|
||||||
+1
-2
@@ -16,10 +16,9 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.lang.psi.stubs;
|
package org.jetbrains.jet.lang.psi.stubs;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
||||||
|
|
||||||
public interface PsiJetFunctionStub extends PsiJetStubWithFqName<JetNamedFunction> {
|
public interface KotlinFunctionStub extends KotlinStubWithFqName<JetNamedFunction> {
|
||||||
boolean isTopLevel();
|
boolean isTopLevel();
|
||||||
|
|
||||||
boolean isExtension();
|
boolean isExtension();
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
|
|
||||||
public interface PsiJetImportDirectiveStub extends StubElement<JetImportDirective> {
|
public interface KotlinImportDirectiveStub extends StubElement<JetImportDirective> {
|
||||||
boolean isAbsoluteInRootPackage();
|
boolean isAbsoluteInRootPackage();
|
||||||
boolean isAllUnder();
|
boolean isAllUnder();
|
||||||
@Nullable
|
@Nullable
|
||||||
+1
-1
@@ -21,6 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.JetModifierList;
|
import org.jetbrains.jet.lang.psi.JetModifierList;
|
||||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||||
|
|
||||||
public interface PsiJetModifierListStub extends StubElement<JetModifierList> {
|
public interface KotlinModifierListStub extends StubElement<JetModifierList> {
|
||||||
boolean hasModifier(@NotNull JetModifierKeywordToken modifierToken);
|
boolean hasModifier(@NotNull JetModifierKeywordToken modifierToken);
|
||||||
}
|
}
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
|
|
||||||
public interface PsiJetNameReferenceExpressionStub extends StubElement<JetNameReferenceExpression> {
|
public interface KotlinNameReferenceExpressionStub extends StubElement<JetNameReferenceExpression> {
|
||||||
@NotNull
|
@NotNull
|
||||||
String getReferencedName();
|
String getReferencedName();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
|
|
||||||
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
||||||
|
|
||||||
public interface PsiJetObjectStub extends PsiJetClassOrObjectStub<JetObjectDeclaration> {
|
public interface KotlinObjectStub extends KotlinClassOrObjectStub<JetObjectDeclaration> {
|
||||||
boolean isClassObject();
|
boolean isClassObject();
|
||||||
boolean isObjectLiteral();
|
boolean isObjectLiteral();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
|
|
||||||
import org.jetbrains.jet.lang.psi.JetParameter;
|
import org.jetbrains.jet.lang.psi.JetParameter;
|
||||||
|
|
||||||
public interface PsiJetParameterStub extends PsiJetStubWithFqName<JetParameter> {
|
public interface KotlinParameterStub extends KotlinStubWithFqName<JetParameter> {
|
||||||
boolean isMutable();
|
boolean isMutable();
|
||||||
boolean hasValOrValNode();
|
boolean hasValOrValNode();
|
||||||
boolean hasDefaultValue();
|
boolean hasDefaultValue();
|
||||||
+1
-1
@@ -19,5 +19,5 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetElement;
|
import org.jetbrains.jet.lang.psi.JetElement;
|
||||||
|
|
||||||
public interface PsiJetPlaceHolderStub<T extends JetElement> extends StubElement<T> {
|
public interface KotlinPlaceHolderStub<T extends JetElement> extends StubElement<T> {
|
||||||
}
|
}
|
||||||
+1
-1
@@ -19,7 +19,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
||||||
|
|
||||||
public interface PsiJetPropertyAccessorStub extends StubElement<JetPropertyAccessor> {
|
public interface KotlinPropertyAccessorStub extends StubElement<JetPropertyAccessor> {
|
||||||
boolean isGetter();
|
boolean isGetter();
|
||||||
boolean hasBody();
|
boolean hasBody();
|
||||||
boolean hasBlockBody();
|
boolean hasBlockBody();
|
||||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
|
|
||||||
import org.jetbrains.jet.lang.psi.JetProperty;
|
import org.jetbrains.jet.lang.psi.JetProperty;
|
||||||
|
|
||||||
public interface PsiJetPropertyStub extends PsiJetStubWithFqName<JetProperty> {
|
public interface KotlinPropertyStub extends KotlinStubWithFqName<JetProperty> {
|
||||||
boolean isVar();
|
boolean isVar();
|
||||||
boolean isTopLevel();
|
boolean isTopLevel();
|
||||||
boolean hasDelegate();
|
boolean hasDelegate();
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import com.intellij.psi.stubs.NamedStub;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public interface PsiJetStubWithFqName<T extends PsiNamedElement> extends NamedStub<T> {
|
public interface KotlinStubWithFqName<T extends PsiNamedElement> extends NamedStub<T> {
|
||||||
@Nullable
|
@Nullable
|
||||||
FqName getFqName();
|
FqName getFqName();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -19,6 +19,6 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
||||||
|
|
||||||
public interface PsiJetTypeConstraintStub extends StubElement<JetTypeConstraint> {
|
public interface KotlinTypeConstraintStub extends StubElement<JetTypeConstraint> {
|
||||||
boolean isClassObjectConstraint();
|
boolean isClassObjectConstraint();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -18,7 +18,7 @@ package org.jetbrains.jet.lang.psi.stubs;
|
|||||||
|
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
||||||
|
|
||||||
public interface PsiJetTypeParameterStub extends PsiJetStubWithFqName<JetTypeParameter> {
|
public interface KotlinTypeParameterStub extends KotlinStubWithFqName<JetTypeParameter> {
|
||||||
boolean isInVariance();
|
boolean isInVariance();
|
||||||
boolean isOutVariance();
|
boolean isOutVariance();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -20,6 +20,6 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import org.jetbrains.jet.lang.psi.JetProjectionKind;
|
import org.jetbrains.jet.lang.psi.JetProjectionKind;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
||||||
|
|
||||||
public interface PsiJetTypeProjectionStub extends StubElement<JetTypeProjection> {
|
public interface KotlinTypeProjectionStub extends StubElement<JetTypeProjection> {
|
||||||
JetProjectionKind getProjectionKind();
|
JetProjectionKind getProjectionKind();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -21,6 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.JetUserType;
|
import org.jetbrains.jet.lang.psi.JetUserType;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
|
|
||||||
public interface PsiJetUserTypeStub extends StubElement<JetUserType> {
|
public interface KotlinUserTypeStub extends StubElement<JetUserType> {
|
||||||
boolean isAbsoluteInRootPackage();
|
boolean isAbsoluteInRootPackage();
|
||||||
}
|
}
|
||||||
+10
-10
@@ -25,42 +25,42 @@ import org.jetbrains.annotations.NonNls;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
||||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinAnnotationEntryStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetAnnotationEntryStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinAnnotationEntryStubImpl;
|
||||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetAnnotationEntryElementType extends JetStubElementType<PsiJetAnnotationEntryStub, JetAnnotationEntry> {
|
public class JetAnnotationEntryElementType extends JetStubElementType<KotlinAnnotationEntryStub, JetAnnotationEntry> {
|
||||||
|
|
||||||
public JetAnnotationEntryElementType(@NotNull @NonNls String debugName) {
|
public JetAnnotationEntryElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetAnnotationEntry.class, PsiJetAnnotationEntryStub.class);
|
super(debugName, JetAnnotationEntry.class, KotlinAnnotationEntryStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetAnnotationEntryStub createStub(@NotNull JetAnnotationEntry psi, StubElement parentStub) {
|
public KotlinAnnotationEntryStub createStub(@NotNull JetAnnotationEntry psi, StubElement parentStub) {
|
||||||
Name shortName = JetPsiUtil.getShortName(psi);
|
Name shortName = JetPsiUtil.getShortName(psi);
|
||||||
String resultName = shortName != null ? shortName.asString() : psi.getText();
|
String resultName = shortName != null ? shortName.asString() : psi.getText();
|
||||||
boolean hasValueArguments = psi.getValueArgumentList() != null;
|
boolean hasValueArguments = psi.getValueArgumentList() != null;
|
||||||
return new PsiJetAnnotationEntryStubImpl(parentStub, StringRef.fromString(resultName), hasValueArguments);
|
return new KotlinAnnotationEntryStubImpl(parentStub, StringRef.fromString(resultName), hasValueArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetAnnotationEntryStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinAnnotationEntryStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getShortName());
|
dataStream.writeName(stub.getShortName());
|
||||||
dataStream.writeBoolean(stub.hasValueArguments());
|
dataStream.writeBoolean(stub.hasValueArguments());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetAnnotationEntryStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinAnnotationEntryStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef text = dataStream.readName();
|
StringRef text = dataStream.readName();
|
||||||
boolean hasValueArguments = dataStream.readBoolean();
|
boolean hasValueArguments = dataStream.readBoolean();
|
||||||
return new PsiJetAnnotationEntryStubImpl(parentStub, text, hasValueArguments);
|
return new KotlinAnnotationEntryStubImpl(parentStub, text, hasValueArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetAnnotationEntryStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinAnnotationEntryStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexAnnotation(stub, sink);
|
StubIndexServiceFactory.getInstance().indexAnnotation(stub, sink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -27,8 +27,8 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.JetClass;
|
import org.jetbrains.jet.lang.psi.JetClass;
|
||||||
import org.jetbrains.jet.lang.psi.JetEnumEntry;
|
import org.jetbrains.jet.lang.psi.JetEnumEntry;
|
||||||
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetClassStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinClassStubImpl;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.Utils;
|
import org.jetbrains.jet.lang.psi.stubs.impl.Utils;
|
||||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
@@ -36,14 +36,14 @@ import org.jetbrains.jet.lang.resolve.name.FqName;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetClassElementType extends JetStubElementType<PsiJetClassStub, JetClass> {
|
public class JetClassElementType extends JetStubElementType<KotlinClassStub, JetClass> {
|
||||||
public JetClassElementType(@NotNull @NonNls String debugName) {
|
public JetClassElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetClass.class, PsiJetClassStub.class);
|
super(debugName, JetClass.class, KotlinClassStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public JetClass createPsi(@NotNull PsiJetClassStub stub) {
|
public JetClass createPsi(@NotNull KotlinClassStub stub) {
|
||||||
return !stub.isEnumEntry() ? new JetClass(stub) : new JetEnumEntry(stub);
|
return !stub.isEnumEntry() ? new JetClass(stub) : new JetEnumEntry(stub);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,18 +54,18 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetClassStub createStub(@NotNull JetClass psi, StubElement parentStub) {
|
public KotlinClassStub createStub(@NotNull JetClass psi, StubElement parentStub) {
|
||||||
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
||||||
boolean isEnumEntry = psi instanceof JetEnumEntry;
|
boolean isEnumEntry = psi instanceof JetEnumEntry;
|
||||||
List<String> superNames = PsiUtilPackage.getSuperNames(psi);
|
List<String> superNames = PsiUtilPackage.getSuperNames(psi);
|
||||||
return new PsiJetClassStubImpl(
|
return new KotlinClassStubImpl(
|
||||||
getStubType(isEnumEntry), parentStub, StringRef.fromString(fqName != null ? fqName.asString() : null),
|
getStubType(isEnumEntry), parentStub, StringRef.fromString(fqName != null ? fqName.asString() : null),
|
||||||
StringRef.fromString(psi.getName()), Utils.INSTANCE$.wrapStrings(superNames), psi.isTrait(), isEnumEntry,
|
StringRef.fromString(psi.getName()), Utils.INSTANCE$.wrapStrings(superNames), psi.isTrait(), isEnumEntry,
|
||||||
psi.isLocal(), psi.isTopLevel());
|
psi.isLocal(), psi.isTopLevel());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetClassStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinClassStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
FqName fqName = stub.getFqName();
|
FqName fqName = stub.getFqName();
|
||||||
dataStream.writeName(fqName == null ? null : fqName.asString());
|
dataStream.writeName(fqName == null ? null : fqName.asString());
|
||||||
@@ -83,7 +83,7 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetClassStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinClassStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
StringRef qualifiedName = dataStream.readName();
|
StringRef qualifiedName = dataStream.readName();
|
||||||
boolean isTrait = dataStream.readBoolean();
|
boolean isTrait = dataStream.readBoolean();
|
||||||
@@ -97,12 +97,12 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
|||||||
superNames[i] = dataStream.readName();
|
superNames[i] = dataStream.readName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PsiJetClassStubImpl(getStubType(isEnumEntry), parentStub, qualifiedName, name, superNames,
|
return new KotlinClassStubImpl(getStubType(isEnumEntry), parentStub, qualifiedName, name, superNames,
|
||||||
isTrait, isEnumEntry, isLocal, isTopLevel);
|
isTrait, isEnumEntry, isLocal, isTopLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetClassStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinClassStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexClass(stub, sink);
|
StubIndexServiceFactory.getInstance().indexClass(stub, sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -29,13 +29,13 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.parsing.JetParser;
|
import org.jetbrains.jet.lang.parsing.JetParser;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFileStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFileStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetFileStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinFileStubImpl;
|
||||||
import org.jetbrains.jet.plugin.JetLanguage;
|
import org.jetbrains.jet.plugin.JetLanguage;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
public class JetFileElementType extends IStubFileElementType<KotlinFileStub> {
|
||||||
public static final int STUB_VERSION = 30;
|
public static final int STUB_VERSION = 30;
|
||||||
|
|
||||||
public JetFileElementType() {
|
public JetFileElementType() {
|
||||||
@@ -63,7 +63,7 @@ public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetFileStub stub, @NotNull StubOutputStream dataStream)
|
public void serialize(@NotNull KotlinFileStub stub, @NotNull StubOutputStream dataStream)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
dataStream.writeName(stub.getPackageFqName().asString());
|
dataStream.writeName(stub.getPackageFqName().asString());
|
||||||
dataStream.writeBoolean(stub.isScript());
|
dataStream.writeBoolean(stub.isScript());
|
||||||
@@ -71,10 +71,10 @@ public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef packageFqNameAsString = dataStream.readName();
|
StringRef packageFqNameAsString = dataStream.readName();
|
||||||
boolean isScript = dataStream.readBoolean();
|
boolean isScript = dataStream.readBoolean();
|
||||||
return new PsiJetFileStubImpl(null, packageFqNameAsString, isScript);
|
return new KotlinFileStubImpl(null, packageFqNameAsString, isScript);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -87,7 +87,7 @@ public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetFileStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinFileStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexFile(stub, sink);
|
StubIndexServiceFactory.getInstance().indexFile(stub, sink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -21,7 +21,7 @@ import com.intellij.psi.stubs.DefaultStubBuilder;
|
|||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetFile;
|
import org.jetbrains.jet.lang.psi.JetFile;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetFileStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinFileStubImpl;
|
||||||
|
|
||||||
public class JetFileStubBuilder extends DefaultStubBuilder {
|
public class JetFileStubBuilder extends DefaultStubBuilder {
|
||||||
@Override
|
@Override
|
||||||
@@ -31,6 +31,6 @@ public class JetFileStubBuilder extends DefaultStubBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JetFile jetFile = (JetFile) file;
|
JetFile jetFile = (JetFile) file;
|
||||||
return new PsiJetFileStubImpl(jetFile, jetFile.getPackageFqNameByTree().asString(), jetFile.isScriptByTree());
|
return new KotlinFileStubImpl(jetFile, jetFile.getPackageFqNameByTree().asString(), jetFile.isScriptByTree());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -25,32 +25,32 @@ import org.jetbrains.annotations.NonNls;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetFile;
|
import org.jetbrains.jet.lang.psi.JetFile;
|
||||||
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFunctionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetFunctionStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinFunctionStubImpl;
|
||||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStub, JetNamedFunction> {
|
public class JetFunctionElementType extends JetStubElementType<KotlinFunctionStub, JetNamedFunction> {
|
||||||
|
|
||||||
public JetFunctionElementType(@NotNull @NonNls String debugName) {
|
public JetFunctionElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetNamedFunction.class, PsiJetFunctionStub.class);
|
super(debugName, JetNamedFunction.class, KotlinFunctionStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetFunctionStub createStub(@NotNull JetNamedFunction psi, @NotNull StubElement parentStub) {
|
public KotlinFunctionStub createStub(@NotNull JetNamedFunction psi, @NotNull StubElement parentStub) {
|
||||||
boolean isTopLevel = psi.getParent() instanceof JetFile;
|
boolean isTopLevel = psi.getParent() instanceof JetFile;
|
||||||
boolean isExtension = psi.getReceiverTypeReference() != null;
|
boolean isExtension = psi.getReceiverTypeReference() != null;
|
||||||
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
||||||
boolean hasBlockBody = psi.hasBlockBody();
|
boolean hasBlockBody = psi.hasBlockBody();
|
||||||
boolean hasBody = psi.hasBody();
|
boolean hasBody = psi.hasBody();
|
||||||
return new PsiJetFunctionStubImpl(parentStub, StringRef.fromString(psi.getName()), isTopLevel, fqName,
|
return new KotlinFunctionStubImpl(parentStub, StringRef.fromString(psi.getName()), isTopLevel, fqName,
|
||||||
isExtension, hasBlockBody, hasBody, psi.hasTypeParameterListBeforeFunctionName());
|
isExtension, hasBlockBody, hasBody, psi.hasTypeParameterListBeforeFunctionName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetFunctionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinFunctionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
dataStream.writeBoolean(stub.isTopLevel());
|
dataStream.writeBoolean(stub.isTopLevel());
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStu
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetFunctionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinFunctionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
boolean isTopLevel = dataStream.readBoolean();
|
boolean isTopLevel = dataStream.readBoolean();
|
||||||
|
|
||||||
@@ -77,12 +77,12 @@ public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStu
|
|||||||
boolean hasBody = dataStream.readBoolean();
|
boolean hasBody = dataStream.readBoolean();
|
||||||
boolean hasTypeParameterListBeforeFunctionName = dataStream.readBoolean();
|
boolean hasTypeParameterListBeforeFunctionName = dataStream.readBoolean();
|
||||||
|
|
||||||
return new PsiJetFunctionStubImpl(parentStub, name, isTopLevel, fqName, isExtension, hasBlockBody, hasBody,
|
return new KotlinFunctionStubImpl(parentStub, name, isTopLevel, fqName, isExtension, hasBlockBody, hasBody,
|
||||||
hasTypeParameterListBeforeFunctionName);
|
hasTypeParameterListBeforeFunctionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetFunctionStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinFunctionStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexFunction(stub, sink);
|
StubIndexServiceFactory.getInstance().indexFunction(stub, sink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -23,25 +23,25 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetImportDirectiveStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinImportDirectiveStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetImportDirectiveStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinImportDirectiveStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetImportDirectiveElementType extends JetStubElementType<PsiJetImportDirectiveStub, JetImportDirective> {
|
public class JetImportDirectiveElementType extends JetStubElementType<KotlinImportDirectiveStub, JetImportDirective> {
|
||||||
public JetImportDirectiveElementType(@NotNull @NonNls String debugName) {
|
public JetImportDirectiveElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetImportDirective.class, PsiJetImportDirectiveStub.class);
|
super(debugName, JetImportDirective.class, KotlinImportDirectiveStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetImportDirectiveStub createStub(@NotNull JetImportDirective psi, StubElement parentStub) {
|
public KotlinImportDirectiveStub createStub(@NotNull JetImportDirective psi, StubElement parentStub) {
|
||||||
StringRef aliasName = StringRef.fromString(psi.getAliasName());
|
StringRef aliasName = StringRef.fromString(psi.getAliasName());
|
||||||
return new PsiJetImportDirectiveStubImpl(parentStub, psi.isAbsoluteInRootPackage(), psi.isAllUnder(),
|
return new KotlinImportDirectiveStubImpl(parentStub, psi.isAbsoluteInRootPackage(), psi.isAllUnder(),
|
||||||
aliasName, psi.isValidImport());
|
aliasName, psi.isValidImport());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetImportDirectiveStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinImportDirectiveStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeBoolean(stub.isAbsoluteInRootPackage());
|
dataStream.writeBoolean(stub.isAbsoluteInRootPackage());
|
||||||
dataStream.writeBoolean(stub.isAllUnder());
|
dataStream.writeBoolean(stub.isAllUnder());
|
||||||
dataStream.writeName(stub.getAliasName());
|
dataStream.writeName(stub.getAliasName());
|
||||||
@@ -50,11 +50,11 @@ public class JetImportDirectiveElementType extends JetStubElementType<PsiJetImpo
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetImportDirectiveStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinImportDirectiveStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
boolean isAbsoluteInRootPackage = dataStream.readBoolean();
|
boolean isAbsoluteInRootPackage = dataStream.readBoolean();
|
||||||
boolean isAllUnder = dataStream.readBoolean();
|
boolean isAllUnder = dataStream.readBoolean();
|
||||||
StringRef aliasName = dataStream.readName();
|
StringRef aliasName = dataStream.readName();
|
||||||
boolean isValid = dataStream.readBoolean();
|
boolean isValid = dataStream.readBoolean();
|
||||||
return new PsiJetImportDirectiveStubImpl(parentStub, isAbsoluteInRootPackage, isAllUnder, aliasName, isValid);
|
return new KotlinImportDirectiveStubImpl(parentStub, isAbsoluteInRootPackage, isAllUnder, aliasName, isValid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -22,33 +22,33 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetModifierList;
|
import org.jetbrains.jet.lang.psi.JetModifierList;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinModifierListStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetModifierListStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinModifierListStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.jetbrains.jet.lang.psi.stubs.impl.PsiJetModifierListStubImpl.computeMaskFromPsi;
|
import static org.jetbrains.jet.lang.psi.stubs.impl.KotlinModifierListStubImpl.computeMaskFromPsi;
|
||||||
|
|
||||||
public class JetModifierListElementType<T extends JetModifierList> extends JetStubElementType<PsiJetModifierListStub, T> {
|
public class JetModifierListElementType<T extends JetModifierList> extends JetStubElementType<KotlinModifierListStub, T> {
|
||||||
public JetModifierListElementType(@NotNull @NonNls String debugName, @NotNull Class<T> psiClass) {
|
public JetModifierListElementType(@NotNull @NonNls String debugName, @NotNull Class<T> psiClass) {
|
||||||
super(debugName, psiClass, PsiJetModifierListStub.class);
|
super(debugName, psiClass, KotlinModifierListStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetModifierListStub createStub(@NotNull T psi, StubElement parentStub) {
|
public KotlinModifierListStub createStub(@NotNull T psi, StubElement parentStub) {
|
||||||
return new PsiJetModifierListStubImpl(parentStub, computeMaskFromPsi(psi), this);
|
return new KotlinModifierListStubImpl(parentStub, computeMaskFromPsi(psi), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetModifierListStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinModifierListStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
int mask = ((PsiJetModifierListStubImpl) stub).getMask();
|
int mask = ((KotlinModifierListStubImpl) stub).getMask();
|
||||||
dataStream.writeVarInt(mask);
|
dataStream.writeVarInt(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetModifierListStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinModifierListStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
int mask = dataStream.readVarInt();
|
int mask = dataStream.readVarInt();
|
||||||
return new PsiJetModifierListStubImpl(parentStub, mask, this);
|
return new KotlinModifierListStubImpl(parentStub, mask, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -23,30 +23,30 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetNameReferenceExpressionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinNameReferenceExpressionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetNameReferenceExpressionStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinNameReferenceExpressionStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetNameReferenceExpressionElementType extends JetStubElementType<PsiJetNameReferenceExpressionStub, JetNameReferenceExpression> {
|
public class JetNameReferenceExpressionElementType extends JetStubElementType<KotlinNameReferenceExpressionStub, JetNameReferenceExpression> {
|
||||||
public JetNameReferenceExpressionElementType(@NotNull @NonNls String debugName) {
|
public JetNameReferenceExpressionElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetNameReferenceExpression.class, PsiJetNameReferenceExpressionStub.class);
|
super(debugName, JetNameReferenceExpression.class, KotlinNameReferenceExpressionStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetNameReferenceExpressionStub createStub(@NotNull JetNameReferenceExpression psi, StubElement parentStub) {
|
public KotlinNameReferenceExpressionStub createStub(@NotNull JetNameReferenceExpression psi, StubElement parentStub) {
|
||||||
return new PsiJetNameReferenceExpressionStubImpl(parentStub, StringRef.fromString(psi.getReferencedName()));
|
return new KotlinNameReferenceExpressionStubImpl(parentStub, StringRef.fromString(psi.getReferencedName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetNameReferenceExpressionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinNameReferenceExpressionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getReferencedName());
|
dataStream.writeName(stub.getReferencedName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetNameReferenceExpressionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinNameReferenceExpressionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef referencedName = dataStream.readName();
|
StringRef referencedName = dataStream.readName();
|
||||||
return new PsiJetNameReferenceExpressionStubImpl(parentStub, referencedName);
|
return new KotlinNameReferenceExpressionStubImpl(parentStub, referencedName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-12
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.lang.psi.stubs.elements;
|
package org.jetbrains.jet.lang.psi.stubs.elements;
|
||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
|
||||||
import com.intellij.psi.stubs.IndexSink;
|
import com.intellij.psi.stubs.IndexSink;
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import com.intellij.psi.stubs.StubInputStream;
|
import com.intellij.psi.stubs.StubInputStream;
|
||||||
@@ -26,10 +25,9 @@ import org.jetbrains.annotations.NonNls;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetClassObject;
|
import org.jetbrains.jet.lang.psi.JetClassObject;
|
||||||
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
||||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
|
||||||
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinObjectStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetObjectStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinObjectStubImpl;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.Utils;
|
import org.jetbrains.jet.lang.psi.stubs.impl.Utils;
|
||||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
@@ -37,22 +35,22 @@ import org.jetbrains.jet.lang.resolve.name.FqName;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, JetObjectDeclaration> {
|
public class JetObjectElementType extends JetStubElementType<KotlinObjectStub, JetObjectDeclaration> {
|
||||||
public JetObjectElementType(@NotNull @NonNls String debugName) {
|
public JetObjectElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetObjectDeclaration.class, PsiJetObjectStub.class);
|
super(debugName, JetObjectDeclaration.class, KotlinObjectStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetObjectStub createStub(@NotNull JetObjectDeclaration psi, StubElement parentStub) {
|
public KotlinObjectStub createStub(@NotNull JetObjectDeclaration psi, StubElement parentStub) {
|
||||||
String name = psi.getName();
|
String name = psi.getName();
|
||||||
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
FqName fqName = ResolveSessionUtils.safeFqNameForLazyResolve(psi);
|
||||||
List<String> superNames = PsiUtilPackage.getSuperNames(psi);
|
List<String> superNames = PsiUtilPackage.getSuperNames(psi);
|
||||||
return new PsiJetObjectStubImpl(parentStub, StringRef.fromString(name), fqName, Utils.INSTANCE$.wrapStrings(superNames),
|
return new KotlinObjectStubImpl(parentStub, StringRef.fromString(name), fqName, Utils.INSTANCE$.wrapStrings(superNames),
|
||||||
psi.isTopLevel(), isClassObject(psi), psi.isLocal(), psi.isObjectLiteral());
|
psi.isTopLevel(), isClassObject(psi), psi.isLocal(), psi.isObjectLiteral());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetObjectStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinObjectStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
|
|
||||||
FqName fqName = stub.getFqName();
|
FqName fqName = stub.getFqName();
|
||||||
@@ -72,7 +70,7 @@ public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, J
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetObjectStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinObjectStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
StringRef fqNameStr = dataStream.readName();
|
StringRef fqNameStr = dataStream.readName();
|
||||||
FqName fqName = fqNameStr != null ? new FqName(fqNameStr.toString()) : null;
|
FqName fqName = fqNameStr != null ? new FqName(fqNameStr.toString()) : null;
|
||||||
@@ -88,11 +86,11 @@ public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, J
|
|||||||
superNames[i] = dataStream.readName();
|
superNames[i] = dataStream.readName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PsiJetObjectStubImpl(parentStub, name, fqName, superNames, isTopLevel, isClassObject, isLocal, isObjectLiteral);
|
return new KotlinObjectStubImpl(parentStub, name, fqName, superNames, isTopLevel, isClassObject, isLocal, isObjectLiteral);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetObjectStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinObjectStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexObject(stub, sink);
|
StubIndexServiceFactory.getInstance().indexObject(stub, sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-11
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.lang.psi.stubs.elements;
|
package org.jetbrains.jet.lang.psi.stubs.elements;
|
||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
|
||||||
import com.intellij.psi.PsiElement;
|
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import com.intellij.psi.stubs.StubInputStream;
|
import com.intellij.psi.stubs.StubInputStream;
|
||||||
import com.intellij.psi.stubs.StubOutputStream;
|
import com.intellij.psi.stubs.StubOutputStream;
|
||||||
@@ -25,27 +23,27 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetParameter;
|
import org.jetbrains.jet.lang.psi.JetParameter;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetParameterStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinParameterStubImpl;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetParameterElementType extends JetStubElementType<PsiJetParameterStub, JetParameter> {
|
public class JetParameterElementType extends JetStubElementType<KotlinParameterStub, JetParameter> {
|
||||||
public JetParameterElementType(@NotNull @NonNls String debugName) {
|
public JetParameterElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetParameter.class, PsiJetParameterStub.class);
|
super(debugName, JetParameter.class, KotlinParameterStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetParameterStub createStub(@NotNull JetParameter psi, StubElement parentStub) {
|
public KotlinParameterStub createStub(@NotNull JetParameter psi, StubElement parentStub) {
|
||||||
FqName fqName = psi.getFqName();
|
FqName fqName = psi.getFqName();
|
||||||
StringRef fqNameRef = StringRef.fromString(fqName != null ? fqName.asString() : null);
|
StringRef fqNameRef = StringRef.fromString(fqName != null ? fqName.asString() : null);
|
||||||
return new PsiJetParameterStubImpl(parentStub, fqNameRef, StringRef.fromString(psi.getName()),
|
return new KotlinParameterStubImpl(parentStub, fqNameRef, StringRef.fromString(psi.getName()),
|
||||||
psi.isMutable(), psi.hasValOrVarNode(), psi.hasDefaultValue());
|
psi.isMutable(), psi.hasValOrVarNode(), psi.hasDefaultValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
dataStream.writeBoolean(stub.isMutable());
|
dataStream.writeBoolean(stub.isMutable());
|
||||||
dataStream.writeBoolean(stub.hasValOrValNode());
|
dataStream.writeBoolean(stub.hasValOrValNode());
|
||||||
@@ -56,13 +54,13 @@ public class JetParameterElementType extends JetStubElementType<PsiJetParameterS
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
boolean isMutable = dataStream.readBoolean();
|
boolean isMutable = dataStream.readBoolean();
|
||||||
boolean hasValOrValNode = dataStream.readBoolean();
|
boolean hasValOrValNode = dataStream.readBoolean();
|
||||||
boolean hasDefaultValue = dataStream.readBoolean();
|
boolean hasDefaultValue = dataStream.readBoolean();
|
||||||
StringRef fqName = dataStream.readName();
|
StringRef fqName = dataStream.readName();
|
||||||
|
|
||||||
return new PsiJetParameterStubImpl(parentStub, fqName, name, isMutable, hasValOrValNode, hasDefaultValue);
|
return new KotlinParameterStubImpl(parentStub, fqName, name, isMutable, hasValOrValNode, hasDefaultValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -22,30 +22,30 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetElementImplStub;
|
import org.jetbrains.jet.lang.psi.JetElementImplStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetPlaceHolderStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinPlaceHolderStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetPlaceHolderStubElementType<T extends JetElementImplStub<? extends StubElement<?>>> extends JetStubElementType<PsiJetPlaceHolderStub<T>, T> {
|
public class JetPlaceHolderStubElementType<T extends JetElementImplStub<? extends StubElement<?>>> extends JetStubElementType<KotlinPlaceHolderStub<T>, T> {
|
||||||
|
|
||||||
public JetPlaceHolderStubElementType(@NotNull @NonNls String debugName, @NotNull Class<T> psiClass) {
|
public JetPlaceHolderStubElementType(@NotNull @NonNls String debugName, @NotNull Class<T> psiClass) {
|
||||||
super(debugName, psiClass, PsiJetPlaceHolderStub.class);
|
super(debugName, psiClass, KotlinPlaceHolderStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPlaceHolderStub<T> createStub(@NotNull T psi, StubElement parentStub) {
|
public KotlinPlaceHolderStub<T> createStub(@NotNull T psi, StubElement parentStub) {
|
||||||
return new PsiJetPlaceHolderStubImpl<T>(parentStub, this);
|
return new KotlinPlaceHolderStubImpl<T>(parentStub, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetPlaceHolderStub<T> stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinPlaceHolderStub<T> stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPlaceHolderStub<T> deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinPlaceHolderStub<T> deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
return new PsiJetPlaceHolderStubImpl<T>(parentStub, this);
|
return new KotlinPlaceHolderStubImpl<T>(parentStub, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -22,23 +22,23 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyAccessorStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyAccessorStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetPropertyAccessorStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinPropertyAccessorStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetPropertyAccessorElementType extends JetStubElementType<PsiJetPropertyAccessorStub, JetPropertyAccessor> {
|
public class JetPropertyAccessorElementType extends JetStubElementType<KotlinPropertyAccessorStub, JetPropertyAccessor> {
|
||||||
public JetPropertyAccessorElementType(@NotNull @NonNls String debugName) {
|
public JetPropertyAccessorElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetPropertyAccessor.class, PsiJetPropertyAccessorStub.class);
|
super(debugName, JetPropertyAccessor.class, KotlinPropertyAccessorStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPropertyAccessorStub createStub(@NotNull JetPropertyAccessor psi, StubElement parentStub) {
|
public KotlinPropertyAccessorStub createStub(@NotNull JetPropertyAccessor psi, StubElement parentStub) {
|
||||||
return new PsiJetPropertyAccessorStubImpl(parentStub, psi.isGetter(), psi.hasBody(), psi.hasBlockBody());
|
return new KotlinPropertyAccessorStubImpl(parentStub, psi.isGetter(), psi.hasBody(), psi.hasBlockBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetPropertyAccessorStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinPropertyAccessorStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeBoolean(stub.isGetter());
|
dataStream.writeBoolean(stub.isGetter());
|
||||||
dataStream.writeBoolean(stub.hasBody());
|
dataStream.writeBoolean(stub.hasBody());
|
||||||
dataStream.writeBoolean(stub.hasBlockBody());
|
dataStream.writeBoolean(stub.hasBlockBody());
|
||||||
@@ -46,10 +46,10 @@ public class JetPropertyAccessorElementType extends JetStubElementType<PsiJetPro
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPropertyAccessorStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinPropertyAccessorStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
boolean isGetter = dataStream.readBoolean();
|
boolean isGetter = dataStream.readBoolean();
|
||||||
boolean hasBody = dataStream.readBoolean();
|
boolean hasBody = dataStream.readBoolean();
|
||||||
boolean hasBlockBody = dataStream.readBoolean();
|
boolean hasBlockBody = dataStream.readBoolean();
|
||||||
return new PsiJetPropertyAccessorStubImpl(parentStub, isGetter, hasBody, hasBlockBody);
|
return new KotlinPropertyAccessorStubImpl(parentStub, isGetter, hasBody, hasBlockBody);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -24,25 +24,25 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetProperty;
|
import org.jetbrains.jet.lang.psi.JetProperty;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetPropertyStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinPropertyStubImpl;
|
||||||
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
import org.jetbrains.jet.lang.resolve.lazy.ResolveSessionUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStub, JetProperty> {
|
public class JetPropertyElementType extends JetStubElementType<KotlinPropertyStub, JetProperty> {
|
||||||
public JetPropertyElementType(@NotNull @NonNls String debugName) {
|
public JetPropertyElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetProperty.class, PsiJetPropertyStub.class);
|
super(debugName, JetProperty.class, KotlinPropertyStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPropertyStub createStub(@NotNull JetProperty psi, StubElement parentStub) {
|
public KotlinPropertyStub createStub(@NotNull JetProperty psi, StubElement parentStub) {
|
||||||
assert !psi.isLocal() :
|
assert !psi.isLocal() :
|
||||||
String.format("Should not store local property: %s, parent %s",
|
String.format("Should not store local property: %s, parent %s",
|
||||||
psi.getText(), psi.getParent() != null ? psi.getParent().getText() : "<no parent>");
|
psi.getText(), psi.getParent() != null ? psi.getParent().getText() : "<no parent>");
|
||||||
|
|
||||||
return new PsiJetPropertyStubImpl(
|
return new KotlinPropertyStubImpl(
|
||||||
parentStub, StringRef.fromString(psi.getName()),
|
parentStub, StringRef.fromString(psi.getName()),
|
||||||
psi.isVar(), psi.isTopLevel(), psi.hasDelegate(),
|
psi.isVar(), psi.isTopLevel(), psi.hasDelegate(),
|
||||||
psi.hasDelegateExpression(), psi.hasInitializer(),
|
psi.hasDelegateExpression(), psi.hasInitializer(),
|
||||||
@@ -52,7 +52,7 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetPropertyStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinPropertyStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
dataStream.writeBoolean(stub.isVar());
|
dataStream.writeBoolean(stub.isVar());
|
||||||
dataStream.writeBoolean(stub.isTopLevel());
|
dataStream.writeBoolean(stub.isTopLevel());
|
||||||
@@ -68,7 +68,7 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetPropertyStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinPropertyStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
boolean isVar = dataStream.readBoolean();
|
boolean isVar = dataStream.readBoolean();
|
||||||
boolean isTopLevel = dataStream.readBoolean();
|
boolean isTopLevel = dataStream.readBoolean();
|
||||||
@@ -81,12 +81,12 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
|||||||
StringRef fqNameAsString = dataStream.readName();
|
StringRef fqNameAsString = dataStream.readName();
|
||||||
FqName fqName = fqNameAsString != null ? new FqName(fqNameAsString.toString()) : null;
|
FqName fqName = fqNameAsString != null ? new FqName(fqNameAsString.toString()) : null;
|
||||||
|
|
||||||
return new PsiJetPropertyStubImpl(parentStub, name, isVar, isTopLevel, hasDelegate,
|
return new KotlinPropertyStubImpl(parentStub, name, isVar, isTopLevel, hasDelegate,
|
||||||
hasDelegateExpression, hasInitializer, hasReceiverTypeRef, hasReturnTypeRef, fqName);
|
hasDelegateExpression, hasInitializer, hasReceiverTypeRef, hasReturnTypeRef, fqName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexStub(@NotNull PsiJetPropertyStub stub, @NotNull IndexSink sink) {
|
public void indexStub(@NotNull KotlinPropertyStub stub, @NotNull IndexSink sink) {
|
||||||
StubIndexServiceFactory.getInstance().indexProperty(stub, sink);
|
StubIndexServiceFactory.getInstance().indexProperty(stub, sink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -22,30 +22,30 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeConstraintStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetTypeConstraintImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinTypeConstraintImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetTypeConstraintElementType extends JetStubElementType<PsiJetTypeConstraintStub, JetTypeConstraint> {
|
public class JetTypeConstraintElementType extends JetStubElementType<KotlinTypeConstraintStub, JetTypeConstraint> {
|
||||||
public JetTypeConstraintElementType(@NotNull @NonNls String debugName) {
|
public JetTypeConstraintElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetTypeConstraint.class, PsiJetTypeConstraintStub.class);
|
super(debugName, JetTypeConstraint.class, KotlinTypeConstraintStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeConstraintStub createStub(@NotNull JetTypeConstraint psi, StubElement parentStub) {
|
public KotlinTypeConstraintStub createStub(@NotNull JetTypeConstraint psi, StubElement parentStub) {
|
||||||
return new PsiJetTypeConstraintImpl(parentStub, psi.isClassObjectConstraint());
|
return new KotlinTypeConstraintImpl(parentStub, psi.isClassObjectConstraint());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetTypeConstraintStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinTypeConstraintStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeBoolean(stub.isClassObjectConstraint());
|
dataStream.writeBoolean(stub.isClassObjectConstraint());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeConstraintStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinTypeConstraintStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
boolean isClassObjectConstraint = dataStream.readBoolean();
|
boolean isClassObjectConstraint = dataStream.readBoolean();
|
||||||
return new PsiJetTypeConstraintImpl(parentStub, isClassObjectConstraint);
|
return new KotlinTypeConstraintImpl(parentStub, isClassObjectConstraint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-10
@@ -23,26 +23,25 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeReference;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinTypeParameterStubImpl;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetTypeParameterStubImpl;
|
|
||||||
import org.jetbrains.jet.lang.types.Variance;
|
import org.jetbrains.jet.lang.types.Variance;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetTypeParameterElementType extends JetStubElementType<PsiJetTypeParameterStub, JetTypeParameter> {
|
public class JetTypeParameterElementType extends JetStubElementType<KotlinTypeParameterStub, JetTypeParameter> {
|
||||||
public JetTypeParameterElementType(@NotNull @NonNls String debugName) {
|
public JetTypeParameterElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetTypeParameter.class, PsiJetTypeParameterStub.class);
|
super(debugName, JetTypeParameter.class, KotlinTypeParameterStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeParameterStub createStub(@NotNull JetTypeParameter psi, StubElement parentStub) {
|
public KotlinTypeParameterStub createStub(@NotNull JetTypeParameter psi, StubElement parentStub) {
|
||||||
return new PsiJetTypeParameterStubImpl(parentStub, StringRef.fromString(psi.getName()),
|
return new KotlinTypeParameterStubImpl(parentStub, StringRef.fromString(psi.getName()),
|
||||||
psi.getVariance() == Variance.IN_VARIANCE, psi.getVariance() == Variance.OUT_VARIANCE);
|
psi.getVariance() == Variance.IN_VARIANCE, psi.getVariance() == Variance.OUT_VARIANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetTypeParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinTypeParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeName(stub.getName());
|
dataStream.writeName(stub.getName());
|
||||||
dataStream.writeBoolean(stub.isInVariance());
|
dataStream.writeBoolean(stub.isInVariance());
|
||||||
dataStream.writeBoolean(stub.isOutVariance());
|
dataStream.writeBoolean(stub.isOutVariance());
|
||||||
@@ -50,11 +49,11 @@ public class JetTypeParameterElementType extends JetStubElementType<PsiJetTypePa
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinTypeParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
StringRef name = dataStream.readName();
|
StringRef name = dataStream.readName();
|
||||||
boolean isInVariance = dataStream.readBoolean();
|
boolean isInVariance = dataStream.readBoolean();
|
||||||
boolean isOutVariance = dataStream.readBoolean();
|
boolean isOutVariance = dataStream.readBoolean();
|
||||||
|
|
||||||
return new PsiJetTypeParameterStubImpl(parentStub, name, isInVariance, isOutVariance);
|
return new KotlinTypeParameterStubImpl(parentStub, name, isInVariance, isOutVariance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -22,30 +22,30 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeProjectionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeProjectionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetTypeProjectionStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinTypeProjectionStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetTypeProjectionElementType extends JetStubElementType<PsiJetTypeProjectionStub, JetTypeProjection> {
|
public class JetTypeProjectionElementType extends JetStubElementType<KotlinTypeProjectionStub, JetTypeProjection> {
|
||||||
public JetTypeProjectionElementType(@NotNull @NonNls String debugName) {
|
public JetTypeProjectionElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetTypeProjection.class, PsiJetTypeProjectionStub.class);
|
super(debugName, JetTypeProjection.class, KotlinTypeProjectionStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeProjectionStub createStub(@NotNull JetTypeProjection psi, StubElement parentStub) {
|
public KotlinTypeProjectionStub createStub(@NotNull JetTypeProjection psi, StubElement parentStub) {
|
||||||
return new PsiJetTypeProjectionStubImpl(parentStub, psi.getProjectionKind().ordinal());
|
return new KotlinTypeProjectionStubImpl(parentStub, psi.getProjectionKind().ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetTypeProjectionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinTypeProjectionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeVarInt(stub.getProjectionKind().ordinal());
|
dataStream.writeVarInt(stub.getProjectionKind().ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetTypeProjectionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinTypeProjectionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
int projectionKindOrdinal = dataStream.readVarInt();
|
int projectionKindOrdinal = dataStream.readVarInt();
|
||||||
return new PsiJetTypeProjectionStubImpl(parentStub, projectionKindOrdinal);
|
return new KotlinTypeProjectionStubImpl(parentStub, projectionKindOrdinal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -22,30 +22,30 @@ import com.intellij.psi.stubs.StubOutputStream;
|
|||||||
import org.jetbrains.annotations.NonNls;
|
import org.jetbrains.annotations.NonNls;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetUserType;
|
import org.jetbrains.jet.lang.psi.JetUserType;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetUserTypeStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinUserTypeStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetUserTypeStubImpl;
|
import org.jetbrains.jet.lang.psi.stubs.impl.KotlinUserTypeStubImpl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JetUserTypeElementType extends JetStubElementType<PsiJetUserTypeStub, JetUserType> {
|
public class JetUserTypeElementType extends JetStubElementType<KotlinUserTypeStub, JetUserType> {
|
||||||
public JetUserTypeElementType(@NotNull @NonNls String debugName) {
|
public JetUserTypeElementType(@NotNull @NonNls String debugName) {
|
||||||
super(debugName, JetUserType.class, PsiJetUserTypeStub.class);
|
super(debugName, JetUserType.class, KotlinUserTypeStub.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiJetUserTypeStub createStub(@NotNull JetUserType psi, StubElement parentStub) {
|
public KotlinUserTypeStub createStub(@NotNull JetUserType psi, StubElement parentStub) {
|
||||||
return new PsiJetUserTypeStubImpl(parentStub, psi.isAbsoluteInRootPackage());
|
return new KotlinUserTypeStubImpl(parentStub, psi.isAbsoluteInRootPackage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(@NotNull PsiJetUserTypeStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
public void serialize(@NotNull KotlinUserTypeStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||||
dataStream.writeBoolean(stub.isAbsoluteInRootPackage());
|
dataStream.writeBoolean(stub.isAbsoluteInRootPackage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public PsiJetUserTypeStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
public KotlinUserTypeStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||||
boolean isAbsoluteInRootPackage = dataStream.readBoolean();
|
boolean isAbsoluteInRootPackage = dataStream.readBoolean();
|
||||||
return new PsiJetUserTypeStubImpl(parentStub, isAbsoluteInRootPackage);
|
return new KotlinUserTypeStubImpl(parentStub, isAbsoluteInRootPackage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-12
@@ -26,34 +26,34 @@ public interface StubIndexService {
|
|||||||
*/
|
*/
|
||||||
StubIndexService NO_INDEX_SERVICE = new StubIndexService() {
|
StubIndexService NO_INDEX_SERVICE = new StubIndexService() {
|
||||||
@Override
|
@Override
|
||||||
public void indexFile(PsiJetFileStub stub, IndexSink sink) {
|
public void indexFile(KotlinFileStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexClass(PsiJetClassStub stub, IndexSink sink) {
|
public void indexClass(KotlinClassStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexFunction(PsiJetFunctionStub stub, IndexSink sink) {
|
public void indexFunction(KotlinFunctionStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexObject(PsiJetObjectStub stub, IndexSink sink) {
|
public void indexObject(KotlinObjectStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexProperty(PsiJetPropertyStub stub, IndexSink sink) {
|
public void indexProperty(KotlinPropertyStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink) {
|
public void indexAnnotation(KotlinAnnotationEntryStub stub, IndexSink sink) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void indexFile(PsiJetFileStub stub, IndexSink sink);
|
void indexFile(KotlinFileStub stub, IndexSink sink);
|
||||||
void indexClass(PsiJetClassStub stub, IndexSink sink);
|
void indexClass(KotlinClassStub stub, IndexSink sink);
|
||||||
void indexFunction(PsiJetFunctionStub stub, IndexSink sink);
|
void indexFunction(KotlinFunctionStub stub, IndexSink sink);
|
||||||
void indexObject(PsiJetObjectStub stub, IndexSink sink);
|
void indexObject(KotlinObjectStub stub, IndexSink sink);
|
||||||
void indexProperty(PsiJetPropertyStub stub, IndexSink sink);
|
void indexProperty(KotlinPropertyStub stub, IndexSink sink);
|
||||||
void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink);
|
void indexAnnotation(KotlinAnnotationEntryStub stub, IndexSink sink);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -20,14 +20,14 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
import org.jetbrains.jet.lang.psi.JetAnnotationEntry;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinAnnotationEntryStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetAnnotationEntryStubImpl extends JetStubBaseImpl<JetAnnotationEntry> implements PsiJetAnnotationEntryStub {
|
public class KotlinAnnotationEntryStubImpl extends KotlinStubBaseImpl<JetAnnotationEntry> implements KotlinAnnotationEntryStub {
|
||||||
private final StringRef shortName;
|
private final StringRef shortName;
|
||||||
private final boolean hasValueArguments;
|
private final boolean hasValueArguments;
|
||||||
|
|
||||||
public PsiJetAnnotationEntryStubImpl(StubElement parent, @NotNull StringRef shortName, boolean hasValueArguments) {
|
public KotlinAnnotationEntryStubImpl(StubElement parent, @NotNull StringRef shortName, boolean hasValueArguments) {
|
||||||
super(parent, JetStubElementTypes.ANNOTATION_ENTRY);
|
super(parent, JetStubElementTypes.ANNOTATION_ENTRY);
|
||||||
this.shortName = shortName;
|
this.shortName = shortName;
|
||||||
this.hasValueArguments = hasValueArguments;
|
this.hasValueArguments = hasValueArguments;
|
||||||
+3
-3
@@ -20,14 +20,14 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetClass;
|
import org.jetbrains.jet.lang.psi.JetClass;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetClassElementType;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetClassElementType;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PsiJetClassStubImpl extends JetStubBaseImpl<JetClass> implements PsiJetClassStub {
|
public class KotlinClassStubImpl extends KotlinStubBaseImpl<JetClass> implements KotlinClassStub {
|
||||||
private final StringRef qualifiedName;
|
private final StringRef qualifiedName;
|
||||||
private final StringRef name;
|
private final StringRef name;
|
||||||
private final StringRef[] superNames;
|
private final StringRef[] superNames;
|
||||||
@@ -36,7 +36,7 @@ public class PsiJetClassStubImpl extends JetStubBaseImpl<JetClass> implements Ps
|
|||||||
private final boolean isLocal;
|
private final boolean isLocal;
|
||||||
private final boolean isTopLevel;
|
private final boolean isTopLevel;
|
||||||
|
|
||||||
public PsiJetClassStubImpl(
|
public KotlinClassStubImpl(
|
||||||
JetClassElementType type,
|
JetClassElementType type,
|
||||||
StubElement parent,
|
StubElement parent,
|
||||||
StringRef qualifiedName,
|
StringRef qualifiedName,
|
||||||
+4
-4
@@ -26,25 +26,25 @@ import com.intellij.psi.tree.IStubFileElementType;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetFile;
|
import org.jetbrains.jet.lang.psi.JetFile;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFileStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFileStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PsiJetFileStubImpl extends PsiFileStubImpl<JetFile> implements PsiJetFileStub, PsiClassHolderFileStub<JetFile> {
|
public class KotlinFileStubImpl extends PsiFileStubImpl<JetFile> implements KotlinFileStub, PsiClassHolderFileStub<JetFile> {
|
||||||
|
|
||||||
private final StringRef packageName;
|
private final StringRef packageName;
|
||||||
private final boolean isScript;
|
private final boolean isScript;
|
||||||
|
|
||||||
public PsiJetFileStubImpl(JetFile jetFile, @NotNull StringRef packageName, boolean isScript) {
|
public KotlinFileStubImpl(JetFile jetFile, @NotNull StringRef packageName, boolean isScript) {
|
||||||
super(jetFile);
|
super(jetFile);
|
||||||
this.packageName = packageName;
|
this.packageName = packageName;
|
||||||
// SCRIPT: PsiJetFileStubImpl knows about scripting
|
// SCRIPT: PsiJetFileStubImpl knows about scripting
|
||||||
this.isScript = isScript;
|
this.isScript = isScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PsiJetFileStubImpl(JetFile jetFile, @NotNull String packageName, boolean isScript) {
|
public KotlinFileStubImpl(JetFile jetFile, @NotNull String packageName, boolean isScript) {
|
||||||
this(jetFile, StringRef.fromString(packageName), isScript);
|
this(jetFile, StringRef.fromString(packageName), isScript);
|
||||||
}
|
}
|
||||||
|
|
||||||
+3
-3
@@ -21,11 +21,11 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
import org.jetbrains.jet.lang.psi.JetNamedFunction;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFunctionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public class PsiJetFunctionStubImpl extends JetStubBaseImpl<JetNamedFunction> implements PsiJetFunctionStub {
|
public class KotlinFunctionStubImpl extends KotlinStubBaseImpl<JetNamedFunction> implements KotlinFunctionStub {
|
||||||
|
|
||||||
private final StringRef nameRef;
|
private final StringRef nameRef;
|
||||||
private final boolean isTopLevel;
|
private final boolean isTopLevel;
|
||||||
@@ -35,7 +35,7 @@ public class PsiJetFunctionStubImpl extends JetStubBaseImpl<JetNamedFunction> im
|
|||||||
private final boolean hasBody;
|
private final boolean hasBody;
|
||||||
private final boolean hasTypeParameterListBeforeFunctionName;
|
private final boolean hasTypeParameterListBeforeFunctionName;
|
||||||
|
|
||||||
public PsiJetFunctionStubImpl(
|
public KotlinFunctionStubImpl(
|
||||||
@NotNull StubElement parent,
|
@NotNull StubElement parent,
|
||||||
@Nullable StringRef nameRef,
|
@Nullable StringRef nameRef,
|
||||||
boolean isTopLevel,
|
boolean isTopLevel,
|
||||||
+3
-3
@@ -20,17 +20,17 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
import org.jetbrains.jet.lang.psi.JetImportDirective;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetImportDirectiveStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinImportDirectiveStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetImportDirectiveStubImpl extends JetStubBaseImpl<JetImportDirective> implements PsiJetImportDirectiveStub {
|
public class KotlinImportDirectiveStubImpl extends KotlinStubBaseImpl<JetImportDirective> implements KotlinImportDirectiveStub {
|
||||||
private final boolean isAbsoluteInRootPackage;
|
private final boolean isAbsoluteInRootPackage;
|
||||||
private final boolean isAllUnder;
|
private final boolean isAllUnder;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final StringRef aliasName;
|
private final StringRef aliasName;
|
||||||
private final boolean isValid;
|
private final boolean isValid;
|
||||||
|
|
||||||
public PsiJetImportDirectiveStubImpl(
|
public KotlinImportDirectiveStubImpl(
|
||||||
StubElement parent,
|
StubElement parent,
|
||||||
boolean isAbsoluteInRootPackage,
|
boolean isAbsoluteInRootPackage,
|
||||||
boolean isAllUnder,
|
boolean isAllUnder,
|
||||||
+3
-3
@@ -20,13 +20,13 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.ArrayUtil;
|
import com.intellij.util.ArrayUtil;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetModifierList;
|
import org.jetbrains.jet.lang.psi.JetModifierList;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetModifierListStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinModifierListStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetModifierListElementType;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetModifierListElementType;
|
||||||
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
import org.jetbrains.jet.lexer.JetModifierKeywordToken;
|
||||||
|
|
||||||
import static org.jetbrains.jet.lexer.JetTokens.MODIFIER_KEYWORDS_ARRAY;
|
import static org.jetbrains.jet.lexer.JetTokens.MODIFIER_KEYWORDS_ARRAY;
|
||||||
|
|
||||||
public class PsiJetModifierListStubImpl extends JetStubBaseImpl<JetModifierList> implements PsiJetModifierListStub {
|
public class KotlinModifierListStubImpl extends KotlinStubBaseImpl<JetModifierList> implements KotlinModifierListStub {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
assert MODIFIER_KEYWORDS_ARRAY.length <= 32 : "Current implementation depends on the ability to represent modifier list as bit mask";
|
assert MODIFIER_KEYWORDS_ARRAY.length <= 32 : "Current implementation depends on the ability to represent modifier list as bit mask";
|
||||||
@@ -46,7 +46,7 @@ public class PsiJetModifierListStubImpl extends JetStubBaseImpl<JetModifierList>
|
|||||||
|
|
||||||
private final int mask;
|
private final int mask;
|
||||||
|
|
||||||
public PsiJetModifierListStubImpl(StubElement parent, int mask, @NotNull JetModifierListElementType<?> elementType) {
|
public KotlinModifierListStubImpl(StubElement parent, int mask, @NotNull JetModifierListElementType<?> elementType) {
|
||||||
super(parent, elementType);
|
super(parent, elementType);
|
||||||
this.mask = mask;
|
this.mask = mask;
|
||||||
}
|
}
|
||||||
+4
-3
@@ -20,14 +20,15 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
import org.jetbrains.jet.lang.psi.JetNameReferenceExpression;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetNameReferenceExpressionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinNameReferenceExpressionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetNameReferenceExpressionStubImpl extends JetStubBaseImpl<JetNameReferenceExpression> implements PsiJetNameReferenceExpressionStub {
|
public class KotlinNameReferenceExpressionStubImpl extends KotlinStubBaseImpl<JetNameReferenceExpression> implements
|
||||||
|
KotlinNameReferenceExpressionStub {
|
||||||
@NotNull
|
@NotNull
|
||||||
private final StringRef referencedName;
|
private final StringRef referencedName;
|
||||||
|
|
||||||
public PsiJetNameReferenceExpressionStubImpl(StubElement parent, @NotNull StringRef referencedName) {
|
public KotlinNameReferenceExpressionStubImpl(StubElement parent, @NotNull StringRef referencedName) {
|
||||||
super(parent, JetStubElementTypes.REFERENCE_EXPRESSION);
|
super(parent, JetStubElementTypes.REFERENCE_EXPRESSION);
|
||||||
this.referencedName = referencedName;
|
this.referencedName = referencedName;
|
||||||
}
|
}
|
||||||
+3
-3
@@ -21,14 +21,14 @@ import com.intellij.util.io.StringRef;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
import org.jetbrains.jet.lang.psi.JetObjectDeclaration;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinObjectStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PsiJetObjectStubImpl extends JetStubBaseImpl<JetObjectDeclaration> implements PsiJetObjectStub {
|
public class KotlinObjectStubImpl extends KotlinStubBaseImpl<JetObjectDeclaration> implements KotlinObjectStub {
|
||||||
private final StringRef name;
|
private final StringRef name;
|
||||||
private final FqName fqName;
|
private final FqName fqName;
|
||||||
private final StringRef[] superNames;
|
private final StringRef[] superNames;
|
||||||
@@ -37,7 +37,7 @@ public class PsiJetObjectStubImpl extends JetStubBaseImpl<JetObjectDeclaration>
|
|||||||
private final boolean isLocal;
|
private final boolean isLocal;
|
||||||
private final boolean isObjectLiteral;
|
private final boolean isObjectLiteral;
|
||||||
|
|
||||||
public PsiJetObjectStubImpl(
|
public KotlinObjectStubImpl(
|
||||||
@NotNull StubElement parent,
|
@NotNull StubElement parent,
|
||||||
@Nullable StringRef name,
|
@Nullable StringRef name,
|
||||||
@Nullable FqName fqName,
|
@Nullable FqName fqName,
|
||||||
+3
-3
@@ -20,18 +20,18 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetParameter;
|
import org.jetbrains.jet.lang.psi.JetParameter;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public class PsiJetParameterStubImpl extends JetStubBaseImpl<JetParameter> implements PsiJetParameterStub {
|
public class KotlinParameterStubImpl extends KotlinStubBaseImpl<JetParameter> implements KotlinParameterStub {
|
||||||
private final StringRef name;
|
private final StringRef name;
|
||||||
private final boolean isMutable;
|
private final boolean isMutable;
|
||||||
private final StringRef fqName;
|
private final StringRef fqName;
|
||||||
private final boolean hasValOrValNode;
|
private final boolean hasValOrValNode;
|
||||||
private final boolean hasDefaultValue;
|
private final boolean hasDefaultValue;
|
||||||
|
|
||||||
public PsiJetParameterStubImpl(
|
public KotlinParameterStubImpl(
|
||||||
StubElement parent,
|
StubElement parent,
|
||||||
StringRef fqName, StringRef name,
|
StringRef fqName, StringRef name,
|
||||||
boolean isMutable,
|
boolean isMutable,
|
||||||
+4
-4
@@ -19,11 +19,11 @@ package org.jetbrains.jet.lang.psi.stubs.impl;
|
|||||||
import com.intellij.psi.stubs.IStubElementType;
|
import com.intellij.psi.stubs.IStubElementType;
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetElementImplStub;
|
import org.jetbrains.jet.lang.psi.JetElementImplStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub;
|
||||||
|
|
||||||
public class PsiJetPlaceHolderStubImpl<T extends JetElementImplStub<? extends StubElement<?>>> extends JetStubBaseImpl<T>
|
public class KotlinPlaceHolderStubImpl<T extends JetElementImplStub<? extends StubElement<?>>> extends KotlinStubBaseImpl<T>
|
||||||
implements PsiJetPlaceHolderStub<T> {
|
implements KotlinPlaceHolderStub<T> {
|
||||||
public PsiJetPlaceHolderStubImpl(StubElement parent, IStubElementType elementType) {
|
public KotlinPlaceHolderStubImpl(StubElement parent, IStubElementType elementType) {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
super(parent, elementType);
|
super(parent, elementType);
|
||||||
}
|
}
|
||||||
+3
-3
@@ -18,15 +18,15 @@ package org.jetbrains.jet.lang.psi.stubs.impl;
|
|||||||
|
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
import org.jetbrains.jet.lang.psi.JetPropertyAccessor;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyAccessorStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyAccessorStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetPropertyAccessorStubImpl extends JetStubBaseImpl<JetPropertyAccessor> implements PsiJetPropertyAccessorStub {
|
public class KotlinPropertyAccessorStubImpl extends KotlinStubBaseImpl<JetPropertyAccessor> implements KotlinPropertyAccessorStub {
|
||||||
private final boolean isGetter;
|
private final boolean isGetter;
|
||||||
private final boolean hasBody;
|
private final boolean hasBody;
|
||||||
private final boolean hasBlockBody;
|
private final boolean hasBlockBody;
|
||||||
|
|
||||||
public PsiJetPropertyAccessorStubImpl(StubElement parent, boolean isGetter, boolean hasBody, boolean hasBlockBody) {
|
public KotlinPropertyAccessorStubImpl(StubElement parent, boolean isGetter, boolean hasBody, boolean hasBlockBody) {
|
||||||
super(parent, JetStubElementTypes.PROPERTY_ACCESSOR);
|
super(parent, JetStubElementTypes.PROPERTY_ACCESSOR);
|
||||||
this.isGetter = isGetter;
|
this.isGetter = isGetter;
|
||||||
this.hasBody = hasBody;
|
this.hasBody = hasBody;
|
||||||
+3
-3
@@ -20,11 +20,11 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetProperty;
|
import org.jetbrains.jet.lang.psi.JetProperty;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public class PsiJetPropertyStubImpl extends JetStubBaseImpl<JetProperty> implements PsiJetPropertyStub {
|
public class KotlinPropertyStubImpl extends KotlinStubBaseImpl<JetProperty> implements KotlinPropertyStub {
|
||||||
private final StringRef name;
|
private final StringRef name;
|
||||||
private final boolean isVar;
|
private final boolean isVar;
|
||||||
private final boolean isTopLevel;
|
private final boolean isTopLevel;
|
||||||
@@ -35,7 +35,7 @@ public class PsiJetPropertyStubImpl extends JetStubBaseImpl<JetProperty> impleme
|
|||||||
private final boolean hasReturnTypeRef;
|
private final boolean hasReturnTypeRef;
|
||||||
private final FqName fqName;
|
private final FqName fqName;
|
||||||
|
|
||||||
public PsiJetPropertyStubImpl(
|
public KotlinPropertyStubImpl(
|
||||||
StubElement parent,
|
StubElement parent,
|
||||||
StringRef name,
|
StringRef name,
|
||||||
boolean isVar,
|
boolean isVar,
|
||||||
+5
-5
@@ -22,12 +22,12 @@ import com.intellij.psi.stubs.NamedStub
|
|||||||
import com.intellij.psi.stubs.StubBase
|
import com.intellij.psi.stubs.StubBase
|
||||||
import com.intellij.psi.stubs.StubElement
|
import com.intellij.psi.stubs.StubElement
|
||||||
import org.jetbrains.jet.lang.psi.JetElementImplStub
|
import org.jetbrains.jet.lang.psi.JetElementImplStub
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassOrObjectStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassOrObjectStub
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetStubWithFqName
|
import org.jetbrains.jet.lang.psi.stubs.KotlinStubWithFqName
|
||||||
import java.lang.reflect.Method
|
import java.lang.reflect.Method
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
|
|
||||||
public open class JetStubBaseImpl<T : JetElementImplStub<*>>(parent: StubElement<*>?, elementType: IStubElementType<*, *>) : StubBase<T>(parent, elementType) {
|
public open class KotlinStubBaseImpl<T : JetElementImplStub<*>>(parent: StubElement<*>?, elementType: IStubElementType<*, *>) : StubBase<T>(parent, elementType) {
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
val stubInterface = this.javaClass.getInterfaces().first()
|
val stubInterface = this.javaClass.getInterfaces().first()
|
||||||
@@ -74,8 +74,8 @@ public open class JetStubBaseImpl<T : JetElementImplStub<*>>(parent: StubElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
class object {
|
class object {
|
||||||
private val LOGGER: Logger = Logger.getInstance(javaClass<JetStubBaseImpl<JetElementImplStub<*>>>())
|
private val LOGGER: Logger = Logger.getInstance(javaClass<KotlinStubBaseImpl<JetElementImplStub<*>>>())
|
||||||
|
|
||||||
private val BASE_STUB_INTERFACES = listOf(javaClass<PsiJetStubWithFqName<*>>(), javaClass<PsiJetClassOrObjectStub<*>>(), javaClass<NamedStub<*>>())
|
private val BASE_STUB_INTERFACES = listOf(javaClass<KotlinStubWithFqName<*>>(), javaClass<KotlinClassOrObjectStub<*>>(), javaClass<NamedStub<*>>())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -18,13 +18,13 @@ package org.jetbrains.jet.lang.psi.stubs.impl;
|
|||||||
|
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
import org.jetbrains.jet.lang.psi.JetTypeConstraint;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeConstraintStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeConstraintStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetTypeConstraintImpl extends JetStubBaseImpl<JetTypeConstraint> implements PsiJetTypeConstraintStub {
|
public class KotlinTypeConstraintImpl extends KotlinStubBaseImpl<JetTypeConstraint> implements KotlinTypeConstraintStub {
|
||||||
private final boolean isClassObjectConstraint;
|
private final boolean isClassObjectConstraint;
|
||||||
|
|
||||||
public PsiJetTypeConstraintImpl(StubElement parent, boolean isClassObjectConstraint) {
|
public KotlinTypeConstraintImpl(StubElement parent, boolean isClassObjectConstraint) {
|
||||||
super(parent, JetStubElementTypes.TYPE_CONSTRAINT);
|
super(parent, JetStubElementTypes.TYPE_CONSTRAINT);
|
||||||
this.isClassObjectConstraint = isClassObjectConstraint;
|
this.isClassObjectConstraint = isClassObjectConstraint;
|
||||||
}
|
}
|
||||||
+3
-3
@@ -20,16 +20,16 @@ import com.intellij.psi.stubs.StubElement;
|
|||||||
import com.intellij.util.io.StringRef;
|
import com.intellij.util.io.StringRef;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
import org.jetbrains.jet.lang.psi.JetTypeParameter;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeParameterStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeParameterStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||||
|
|
||||||
public class PsiJetTypeParameterStubImpl extends JetStubBaseImpl<JetTypeParameter> implements PsiJetTypeParameterStub {
|
public class KotlinTypeParameterStubImpl extends KotlinStubBaseImpl<JetTypeParameter> implements KotlinTypeParameterStub {
|
||||||
private final StringRef name;
|
private final StringRef name;
|
||||||
private final boolean isInVariance;
|
private final boolean isInVariance;
|
||||||
private final boolean isOutVariance;
|
private final boolean isOutVariance;
|
||||||
|
|
||||||
public PsiJetTypeParameterStubImpl(StubElement parent, StringRef name, boolean isInVariance, boolean isOutVariance) {
|
public KotlinTypeParameterStubImpl(StubElement parent, StringRef name, boolean isInVariance, boolean isOutVariance) {
|
||||||
super(parent, JetStubElementTypes.TYPE_PARAMETER);
|
super(parent, JetStubElementTypes.TYPE_PARAMETER);
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
+3
-3
@@ -19,14 +19,14 @@ package org.jetbrains.jet.lang.psi.stubs.impl;
|
|||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetProjectionKind;
|
import org.jetbrains.jet.lang.psi.JetProjectionKind;
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
import org.jetbrains.jet.lang.psi.JetTypeProjection;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetTypeProjectionStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinTypeProjectionStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetTypeProjectionStubImpl extends JetStubBaseImpl<JetTypeProjection> implements PsiJetTypeProjectionStub {
|
public class KotlinTypeProjectionStubImpl extends KotlinStubBaseImpl<JetTypeProjection> implements KotlinTypeProjectionStub {
|
||||||
|
|
||||||
private final int projectionKindOrdinal;
|
private final int projectionKindOrdinal;
|
||||||
|
|
||||||
public PsiJetTypeProjectionStubImpl(StubElement parent, int projectionKindOrdinal) {
|
public KotlinTypeProjectionStubImpl(StubElement parent, int projectionKindOrdinal) {
|
||||||
super(parent, JetStubElementTypes.TYPE_PROJECTION);
|
super(parent, JetStubElementTypes.TYPE_PROJECTION);
|
||||||
this.projectionKindOrdinal = projectionKindOrdinal;
|
this.projectionKindOrdinal = projectionKindOrdinal;
|
||||||
}
|
}
|
||||||
+3
-3
@@ -18,13 +18,13 @@ package org.jetbrains.jet.lang.psi.stubs.impl;
|
|||||||
|
|
||||||
import com.intellij.psi.stubs.StubElement;
|
import com.intellij.psi.stubs.StubElement;
|
||||||
import org.jetbrains.jet.lang.psi.JetUserType;
|
import org.jetbrains.jet.lang.psi.JetUserType;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetUserTypeStub;
|
import org.jetbrains.jet.lang.psi.stubs.KotlinUserTypeStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
public class PsiJetUserTypeStubImpl extends JetStubBaseImpl<JetUserType> implements PsiJetUserTypeStub {
|
public class KotlinUserTypeStubImpl extends KotlinStubBaseImpl<JetUserType> implements KotlinUserTypeStub {
|
||||||
private final boolean isAbsoluteInRootPackage;
|
private final boolean isAbsoluteInRootPackage;
|
||||||
|
|
||||||
public PsiJetUserTypeStubImpl(StubElement parent, boolean isAbsoluteInRootPackage) {
|
public KotlinUserTypeStubImpl(StubElement parent, boolean isAbsoluteInRootPackage) {
|
||||||
super(parent, JetStubElementTypes.USER_TYPE);
|
super(parent, JetStubElementTypes.USER_TYPE);
|
||||||
this.isAbsoluteInRootPackage = isAbsoluteInRootPackage;
|
this.isAbsoluteInRootPackage = isAbsoluteInRootPackage;
|
||||||
}
|
}
|
||||||
+11
-11
@@ -28,14 +28,14 @@ import org.jetbrains.jet.lang.resolve.name.Name;
|
|||||||
public class StubIndexServiceImpl implements StubIndexService {
|
public class StubIndexServiceImpl implements StubIndexService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexFile(PsiJetFileStub stub, IndexSink sink) {
|
public void indexFile(KotlinFileStub stub, IndexSink sink) {
|
||||||
FqName packageFqName = stub.getPackageFqName();
|
FqName packageFqName = stub.getPackageFqName();
|
||||||
|
|
||||||
sink.occurrence(JetExactPackagesIndex.getInstance().getKey(), packageFqName.asString());
|
sink.occurrence(JetExactPackagesIndex.getInstance().getKey(), packageFqName.asString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexClass(PsiJetClassStub stub, IndexSink sink) {
|
public void indexClass(KotlinClassStub stub, IndexSink sink) {
|
||||||
String name = stub.getName();
|
String name = stub.getName();
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
sink.occurrence(JetClassShortNameIndex.getInstance().getKey(), name);
|
sink.occurrence(JetClassShortNameIndex.getInstance().getKey(), name);
|
||||||
@@ -51,18 +51,18 @@ public class StubIndexServiceImpl implements StubIndexService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexObject(PsiJetObjectStub stub, IndexSink sink) {
|
public void indexObject(KotlinObjectStub stub, IndexSink sink) {
|
||||||
String name = stub.getName();
|
String name = stub.getName();
|
||||||
FqName fqName = stub.getFqName();
|
FqName fqName = stub.getFqName();
|
||||||
|
|
||||||
if (stub.isClassObject()) {
|
if (stub.isClassObject()) {
|
||||||
StubElement parentClassStub = stub.getParentStub().getParentStub().getParentStub();
|
StubElement parentClassStub = stub.getParentStub().getParentStub().getParentStub();
|
||||||
assert parentClassStub instanceof PsiJetStubWithFqName<?>
|
assert parentClassStub instanceof KotlinStubWithFqName<?>
|
||||||
: "Something but a class/object is a parent to class object stub: " + parentClassStub;
|
: "Something but a class/object is a parent to class object stub: " + parentClassStub;
|
||||||
|
|
||||||
name = JvmAbi.CLASS_OBJECT_CLASS_NAME;
|
name = JvmAbi.CLASS_OBJECT_CLASS_NAME;
|
||||||
|
|
||||||
FqName parentFqName = ((PsiJetStubWithFqName<?>) parentClassStub).getFqName();
|
FqName parentFqName = ((KotlinStubWithFqName<?>) parentClassStub).getFqName();
|
||||||
if (parentFqName != null) {
|
if (parentFqName != null) {
|
||||||
fqName = parentFqName.child(Name.identifier(name));
|
fqName = parentFqName.child(Name.identifier(name));
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class StubIndexServiceImpl implements StubIndexService {
|
|||||||
recordClassOrObjectByPackage(stub, sink);
|
recordClassOrObjectByPackage(stub, sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void indexSuperNames(PsiJetClassOrObjectStub<? extends JetClassOrObject> stub, IndexSink sink) {
|
private static void indexSuperNames(KotlinClassOrObjectStub<? extends JetClassOrObject> stub, IndexSink sink) {
|
||||||
for (String superName : stub.getSuperNames()) {
|
for (String superName : stub.getSuperNames()) {
|
||||||
sink.occurrence(JetSuperClassIndex.getInstance().getKey(), superName);
|
sink.occurrence(JetSuperClassIndex.getInstance().getKey(), superName);
|
||||||
}
|
}
|
||||||
@@ -92,15 +92,15 @@ public class StubIndexServiceImpl implements StubIndexService {
|
|||||||
|
|
||||||
private static void recordClassOrObjectByPackage(StubElement<? extends JetClassOrObject> stub, IndexSink sink) {
|
private static void recordClassOrObjectByPackage(StubElement<? extends JetClassOrObject> stub, IndexSink sink) {
|
||||||
StubElement parentStub = stub.getParentStub();
|
StubElement parentStub = stub.getParentStub();
|
||||||
if (parentStub instanceof PsiJetFileStub) {
|
if (parentStub instanceof KotlinFileStub) {
|
||||||
PsiJetFileStub jetFileStub = (PsiJetFileStub) parentStub;
|
KotlinFileStub jetFileStub = (KotlinFileStub) parentStub;
|
||||||
FqName packageFqName = jetFileStub.getPackageFqName();
|
FqName packageFqName = jetFileStub.getPackageFqName();
|
||||||
sink.occurrence(JetClassByPackageIndex.getInstance().getKey(), packageFqName.asString());
|
sink.occurrence(JetClassByPackageIndex.getInstance().getKey(), packageFqName.asString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexFunction(PsiJetFunctionStub stub, IndexSink sink) {
|
public void indexFunction(KotlinFunctionStub stub, IndexSink sink) {
|
||||||
String name = stub.getName();
|
String name = stub.getName();
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
if (stub.isTopLevel()) {
|
if (stub.isTopLevel()) {
|
||||||
@@ -122,7 +122,7 @@ public class StubIndexServiceImpl implements StubIndexService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexProperty(PsiJetPropertyStub stub, IndexSink sink) {
|
public void indexProperty(KotlinPropertyStub stub, IndexSink sink) {
|
||||||
String name = stub.getName();
|
String name = stub.getName();
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
if (stub.isTopLevel()) {
|
if (stub.isTopLevel()) {
|
||||||
@@ -147,7 +147,7 @@ public class StubIndexServiceImpl implements StubIndexService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink) {
|
public void indexAnnotation(KotlinAnnotationEntryStub stub, IndexSink sink) {
|
||||||
sink.occurrence(JetAnnotationsIndex.getInstance().getKey(), stub.getShortName());
|
sink.occurrence(JetAnnotationsIndex.getInstance().getKey(), stub.getShortName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,17 +23,17 @@ import com.intellij.psi.stubs.StubElement
|
|||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.jetbrains.jet.lang.psi.JetPackageDirective
|
import org.jetbrains.jet.lang.psi.JetPackageDirective
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPlaceHolderStub
|
||||||
import org.jetbrains.jet.lang.psi.JetImportList
|
import org.jetbrains.jet.lang.psi.JetImportList
|
||||||
import org.jetbrains.jet.lang.psi.JetNamedFunction
|
import org.jetbrains.jet.lang.psi.JetNamedFunction
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetFunctionStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinFunctionStub
|
||||||
import org.jetbrains.jet.lang.psi.JetTypeReference
|
import org.jetbrains.jet.lang.psi.JetTypeReference
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetClassStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinClassStub
|
||||||
import org.jetbrains.jet.lang.psi.JetClass
|
import org.jetbrains.jet.lang.psi.JetClass
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinObjectStub
|
||||||
import org.jetbrains.jet.lang.psi.JetObjectDeclaration
|
import org.jetbrains.jet.lang.psi.JetObjectDeclaration
|
||||||
import org.jetbrains.jet.lang.psi.JetProperty
|
import org.jetbrains.jet.lang.psi.JetProperty
|
||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPropertyStub
|
import org.jetbrains.jet.lang.psi.stubs.KotlinPropertyStub
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
import org.jetbrains.jet.lang.psi.JetClassBody
|
import org.jetbrains.jet.lang.psi.JetClassBody
|
||||||
import org.jetbrains.jet.lang.psi.JetClassInitializer
|
import org.jetbrains.jet.lang.psi.JetClassInitializer
|
||||||
@@ -52,14 +52,14 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun packageDirective(text: String) {
|
fun packageDirective(text: String) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val packageDirective = tree.findChildStubByType(JetStubElementTypes.PACKAGE_DIRECTIVE)
|
val packageDirective = tree.findChildStubByType(JetStubElementTypes.PACKAGE_DIRECTIVE)
|
||||||
val psi = JetPackageDirective(packageDirective as PsiJetPlaceHolderStub)
|
val psi = JetPackageDirective(packageDirective as KotlinPlaceHolderStub)
|
||||||
Assert.assertEquals(file.getPackageDirective()!!.getText(), psi.getDebugText())
|
Assert.assertEquals(file.getPackageDirective()!!.getText(), psi.getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun function(text: String) {
|
fun function(text: String) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val function = tree.findChildStubByType(JetStubElementTypes.FUNCTION)
|
val function = tree.findChildStubByType(JetStubElementTypes.FUNCTION)
|
||||||
val psi = JetNamedFunction(function as PsiJetFunctionStub)
|
val psi = JetNamedFunction(function as KotlinFunctionStub)
|
||||||
Assert.assertEquals("STUB: " + file.findChildByClass(javaClass<JetNamedFunction>())!!.getText(), psi.getDebugText())
|
Assert.assertEquals("STUB: " + file.findChildByClass(javaClass<JetNamedFunction>())!!.getText(), psi.getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
val parameterList = function.findChildStubByType(JetStubElementTypes.VALUE_PARAMETER_LIST)!!
|
val parameterList = function.findChildStubByType(JetStubElementTypes.VALUE_PARAMETER_LIST)!!
|
||||||
val valueParameter = parameterList.findChildStubByType(JetStubElementTypes.VALUE_PARAMETER)!!
|
val valueParameter = parameterList.findChildStubByType(JetStubElementTypes.VALUE_PARAMETER)!!
|
||||||
val typeReferenceStub = valueParameter.findChildStubByType(JetStubElementTypes.TYPE_REFERENCE)
|
val typeReferenceStub = valueParameter.findChildStubByType(JetStubElementTypes.TYPE_REFERENCE)
|
||||||
val psiFromStub = JetTypeReference(typeReferenceStub as PsiJetPlaceHolderStub)
|
val psiFromStub = JetTypeReference(typeReferenceStub as KotlinPlaceHolderStub)
|
||||||
val typeReferenceByPsi = file.findChildByClass(javaClass<JetNamedFunction>())!!.getValueParameters()[0].getTypeReference()
|
val typeReferenceByPsi = file.findChildByClass(javaClass<JetNamedFunction>())!!.getValueParameters()[0].getTypeReference()
|
||||||
Assert.assertEquals(typeReferenceByPsi!!.getText(), psiFromStub.getDebugText())
|
Assert.assertEquals(typeReferenceByPsi!!.getText(), psiFromStub.getDebugText())
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun clazz(text: String, expectedText: String? = null) {
|
fun clazz(text: String, expectedText: String? = null) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val clazz = tree.findChildStubByType(JetStubElementTypes.CLASS)!!
|
val clazz = tree.findChildStubByType(JetStubElementTypes.CLASS)!!
|
||||||
val psiFromStub = JetClass(clazz as PsiJetClassStub)
|
val psiFromStub = JetClass(clazz as KotlinClassStub)
|
||||||
val classByPsi = file.findChildByClass(javaClass<JetClass>())
|
val classByPsi = file.findChildByClass(javaClass<JetClass>())
|
||||||
val toCheckAgainst = "STUB: " + (expectedText ?: classByPsi!!.getText())
|
val toCheckAgainst = "STUB: " + (expectedText ?: classByPsi!!.getText())
|
||||||
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
||||||
@@ -89,7 +89,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun obj(text: String, expectedText: String? = null) {
|
fun obj(text: String, expectedText: String? = null) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val obj = tree.findChildStubByType(JetStubElementTypes.OBJECT_DECLARATION)!!
|
val obj = tree.findChildStubByType(JetStubElementTypes.OBJECT_DECLARATION)!!
|
||||||
val psiFromStub = JetObjectDeclaration(obj as PsiJetObjectStub)
|
val psiFromStub = JetObjectDeclaration(obj as KotlinObjectStub)
|
||||||
val objectByPsi = file.findChildByClass(javaClass<JetObjectDeclaration>())
|
val objectByPsi = file.findChildByClass(javaClass<JetObjectDeclaration>())
|
||||||
val toCheckAgainst = "STUB: " + (expectedText ?: objectByPsi!!.getText())
|
val toCheckAgainst = "STUB: " + (expectedText ?: objectByPsi!!.getText())
|
||||||
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
||||||
@@ -98,7 +98,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun property(text: String, expectedText: String? = null) {
|
fun property(text: String, expectedText: String? = null) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val property = tree.findChildStubByType(JetStubElementTypes.PROPERTY)!!
|
val property = tree.findChildStubByType(JetStubElementTypes.PROPERTY)!!
|
||||||
val psiFromStub = JetProperty(property as PsiJetPropertyStub)
|
val psiFromStub = JetProperty(property as KotlinPropertyStub)
|
||||||
val propertyByPsi = file.findChildByClass(javaClass<JetProperty>())
|
val propertyByPsi = file.findChildByClass(javaClass<JetProperty>())
|
||||||
val toCheckAgainst = "STUB: " + (expectedText ?: propertyByPsi!!.getText())
|
val toCheckAgainst = "STUB: " + (expectedText ?: propertyByPsi!!.getText())
|
||||||
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
Assert.assertEquals(toCheckAgainst, psiFromStub.getDebugText())
|
||||||
@@ -107,7 +107,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun importList(text: String) {
|
fun importList(text: String) {
|
||||||
val (file, tree) = createFileAndStubTree(text)
|
val (file, tree) = createFileAndStubTree(text)
|
||||||
val importList = tree.findChildStubByType(JetStubElementTypes.IMPORT_LIST)
|
val importList = tree.findChildStubByType(JetStubElementTypes.IMPORT_LIST)
|
||||||
val psi = JetImportList(importList as PsiJetPlaceHolderStub)
|
val psi = JetImportList(importList as KotlinPlaceHolderStub)
|
||||||
Assert.assertEquals(file.getImportList()!!.getText(), psi.getDebugText())
|
Assert.assertEquals(file.getImportList()!!.getText(), psi.getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,21 +190,21 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() {
|
|||||||
fun testClassBody() {
|
fun testClassBody() {
|
||||||
val tree = createStubTree("class A {\n {} fun f(): Int val c: Int}")
|
val tree = createStubTree("class A {\n {} fun f(): Int val c: Int}")
|
||||||
val classBody = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)
|
val classBody = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)
|
||||||
assertEquals("class body for STUB: class A", JetClassBody(classBody as PsiJetPlaceHolderStub).getDebugText())
|
assertEquals("class body for STUB: class A", JetClassBody(classBody as KotlinPlaceHolderStub).getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testClassInitializer() {
|
fun testClassInitializer() {
|
||||||
val tree = createStubTree("class A {\n {} }")
|
val tree = createStubTree("class A {\n {} }")
|
||||||
val initializer = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!!
|
val initializer = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!!
|
||||||
.findChildStubByType(JetStubElementTypes.ANONYMOUS_INITIALIZER)
|
.findChildStubByType(JetStubElementTypes.ANONYMOUS_INITIALIZER)
|
||||||
assertEquals("initializer in STUB: class A", JetClassInitializer(initializer as PsiJetPlaceHolderStub).getDebugText())
|
assertEquals("initializer in STUB: class A", JetClassInitializer(initializer as KotlinPlaceHolderStub).getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testClassObject() {
|
fun testClassObject() {
|
||||||
val tree = createStubTree("class A { class object {} }")
|
val tree = createStubTree("class A { class object {} }")
|
||||||
val classObject = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!!
|
val classObject = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!!
|
||||||
.findChildStubByType(JetStubElementTypes.CLASS_OBJECT)
|
.findChildStubByType(JetStubElementTypes.CLASS_OBJECT)
|
||||||
assertEquals("class object in STUB: class A", JetClassObject(classObject as PsiJetPlaceHolderStub).getDebugText())
|
assertEquals("class object in STUB: class A", JetClassObject(classObject as KotlinPlaceHolderStub).getDebugText())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testPropertyAccessors() {
|
fun testPropertyAccessors() {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user