diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetClassOrObjectStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetClassOrObjectStub.java index 7ab610fa1f8..825ce57ac75 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetClassOrObjectStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetClassOrObjectStub.java @@ -26,4 +26,6 @@ public interface PsiJetClassOrObjectStub extends Psi @NotNull List getSuperNames(); + + boolean isTopLevel(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetObjectStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetObjectStub.java index 6547314c890..e92dcf10719 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetObjectStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetObjectStub.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.psi.stubs; import org.jetbrains.jet.lang.psi.JetObjectDeclaration; public interface PsiJetObjectStub extends PsiJetClassOrObjectStub { - boolean isTopLevel(); boolean isClassObject(); boolean isObjectLiteral(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java index 96fe0758f6e..b47edc67d5b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetClassElementType.java @@ -67,8 +67,7 @@ public class JetClassElementType extends JetStubElementType superNames = stub.getSuperNames(); dataStream.writeVarInt(superNames.size()); @@ -101,6 +101,7 @@ public class JetClassElementType extends JetStubElementType implements PsiJetCla private final boolean isAnnotation; private final boolean isInner; private final boolean isLocal; + private final boolean isTopLevel; public PsiJetClassStubImpl( JetClassElementType type, @@ -53,7 +54,8 @@ public class PsiJetClassStubImpl extends StubBase implements PsiJetCla boolean isEnumEntry, boolean isAnnotation, boolean isInner, - boolean isLocal + boolean isLocal, + boolean isTopLevel ) { super(parent, type); this.qualifiedName = qualifiedName; @@ -65,6 +67,7 @@ public class PsiJetClassStubImpl extends StubBase implements PsiJetCla this.isAnnotation = isAnnotation; this.isInner = isInner; this.isLocal = isLocal; + this.isTopLevel = isTopLevel; } @Override @@ -121,6 +124,11 @@ public class PsiJetClassStubImpl extends StubBase implements PsiJetCla return result; } + @Override + public boolean isTopLevel() { + return isTopLevel; + } + @Override public String toString() { StringBuilder builder = new StringBuilder();