Add hasInitializer() to JetWithExpressionInitializer interface
This commit is contained in:
@@ -53,6 +53,11 @@ public class JetMultiDeclarationEntry extends JetNamedDeclarationNotStubbed impl
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInitializer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private ASTNode getParentNode() {
|
||||
ASTNode parent = getNode().getTreeParent();
|
||||
|
||||
@@ -85,6 +85,11 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<PsiJetFuncti
|
||||
return PsiTreeUtil.getNextSiblingOfType(getEqualsToken(), JetExpression.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInitializer() {
|
||||
return getInitializer() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemPresentation getPresentation() {
|
||||
return ItemPresentationProviders.getItemPresentation(this);
|
||||
|
||||
@@ -214,6 +214,7 @@ public class JetProperty extends JetTypeParameterListOwnerStub<PsiJetPropertyStu
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInitializer() {
|
||||
PsiJetPropertyStub stub = getStub();
|
||||
if (stub != null) {
|
||||
|
||||
@@ -122,4 +122,9 @@ public class JetPropertyAccessor extends JetDeclarationStub<PsiJetPropertyAccess
|
||||
public JetExpression getInitializer() {
|
||||
return PsiTreeUtil.getNextSiblingOfType(getEqualsToken(), JetExpression.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInitializer() {
|
||||
return getInitializer() != null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface JetWithExpressionInitializer extends PsiElement {
|
||||
@Nullable
|
||||
JetExpression getInitializer();
|
||||
|
||||
boolean hasInitializer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user