From e7fd8c41186b6c64235ab3617ccc27179c07fc3a Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 26 Mar 2014 16:35:25 +0400 Subject: [PATCH] Add PsiJetFunctionStub#hasBody() --- .../jet/lang/psi/stubs/PsiJetFunctionStub.java | 2 ++ .../stubs/elements/JetFunctionElementType.java | 7 +++++-- .../psi/stubs/impl/PsiJetFunctionStubImpl.java | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java index df6ea547d2a..448888cbe57 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetFunctionStub.java @@ -26,6 +26,8 @@ public interface PsiJetFunctionStub extends PsiJetStubWithFqName implement private final boolean isExtension; private final FqName fqName; private final boolean hasBlockBody; + private final boolean hasBody; public PsiJetFunctionStubImpl( @NotNull StubElement parent, @@ -41,9 +42,10 @@ public class PsiJetFunctionStubImpl extends StubBase implement boolean isTopLevel, @Nullable FqName fqName, boolean isExtension, - boolean hasBlockBody + boolean hasBlockBody, + boolean hasBody ) { - this(parent, StringRef.fromString(name), isTopLevel, fqName, isExtension, hasBlockBody); + this(parent, StringRef.fromString(name), isTopLevel, fqName, isExtension, hasBlockBody, hasBody); } public PsiJetFunctionStubImpl( @@ -52,7 +54,8 @@ public class PsiJetFunctionStubImpl extends StubBase implement boolean isTopLevel, @Nullable FqName fqName, boolean isExtension, - boolean hasBlockBody + boolean hasBlockBody, + boolean hasBody ) { super(parent, JetStubElementTypes.FUNCTION); @@ -65,6 +68,7 @@ public class PsiJetFunctionStubImpl extends StubBase implement this.isTopLevel = isTopLevel; this.isExtension = isExtension; this.hasBlockBody = hasBlockBody; + this.hasBody = hasBody; } @Override @@ -87,6 +91,11 @@ public class PsiJetFunctionStubImpl extends StubBase implement return hasBlockBody; } + @Override + public boolean hasBody() { + return hasBody; + } + @NotNull @Override public String[] getAnnotations() {